-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
b9f9c89 introduced version locking for files and binaries managed by a variant module.
For example, coreos variant module can be used to fetch the latest version number of coreos stable release channel and save it in variant.lock. The version number can be used for templating files and other useful things. Running mod up command re-fetches the version number and updates variant.lock.
However there's no way to update coreos variant module itself. This issue is to track the progress towards widening the version locking feature to support variant modules as well.
Perhaps this can be used only when a variant module is sourced from a git repo.
Assume you currently have a variant.mod like:
modules:
- source: github.com/variantdev/modules//coreos@variant.mod?ref=v1.0.0Obviously v1.0.0 is a fixed value that can't be updated automatically.
Alter this to:
modules:
- source: github.com/variantdev/modules//coreos@variant.mod
version: >= 1.0.0On first mod up run, it fetches all the tags and branches in the github.com/variantdev/modules repositories and build a list of semantic versions.
It then uses the version range version: >= 1.0.0 to filter semantic versions larger than or equal to 1.0.0 and chooses the largest version number to be saved to variant.lock.