Documentation
¶
Overview ¶
Package dates fills in, for the versions the registry already holds, when the release each came from was published.
registry.json has said it since ar2 v0.5.0, and the files written before that don't. Nothing can work it out from them: the version string doesn't say it, and for a package whose tags aren't semver there is nothing else to order releases by at all. So it is read off the releases and written in.
This is not a regeneration. Nothing about a version is generated again -- no asset is downloaded, no definition is consulted, nothing already in the file is touched -- which is what makes it a push onto the package branch rather than a pull request per package: the diff of each file is one field, and the release it was read from is what says whether it is right.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct {
// Packages narrows the run to the packages named. Naming none does every package.
Packages []string
// Limit bounds how many packages one run writes to, 0 for as many as there are.
Limit int
// DryRun says what would be written without writing it.
DryRun bool
}
Args holds what one run does.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller fills in the dates.
func New ¶
func New(registry Registry, releases Releases, defs map[string]string) *Controller
New creates a Controller.
type Registry ¶
type Registry interface {
Branch(pkgName string) (string, bool)
BranchSHA(ctx context.Context, branch string) (string, error)
VersionsOnRef(ctx context.Context, logger *slog.Logger, ref string) (map[string]struct{}, error)
File(ctx context.Context, ref, path string) (string, error)
Push(ctx context.Context, branch, parent, message string, files []*g2.File) error
}
Registry is the part of aqua-registry-g2 this reads and writes.