-
Notifications
You must be signed in to change notification settings - Fork 4
Feat: Store exact tags in Manifest for reproducibility and support {tag} pattern #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #98 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 23 23
Lines 3250 3297 +47
=========================================
+ Hits 3250 3297 +47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This reverts commit cfeb29d.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors how tool versions/tags are stored and handled within
dotbins
to improve accuracy and enable future reproducibility features like lock file support.Motivation:
Storing only the stripped version (e.g.,
1.2.3
) prevents reliable fetching of the exact release needed for reproducible installs, as the original tag (e.g.,v1.2.3
) is lost. Storing the exact tag name from GitHub ensures we can always reference the precise release state. This change lays the groundwork for potential "install from lock file" functionality.Additionally, supporting both the full tag (
{tag}
) and the stripped version ({version}
) in asset patterns provides greater flexibility for matching real-world asset naming conventions.Key Changes:
VersionStore
renamed toManifest
: The class responsible for storing installation state is now more accurately namedManifest
.manifest.json
(previouslyversions.json
) now stores the exact Git tag name (e.g.,v1.2.3
) under the key"tag"
. A manifest format version ("version": 2
) is also added.tag_to_version
Utility: A helper functionutils.tag_to_version()
is introduced to derive the stripped version (e.g.,1.2.3
) from a tag when needed.asset_patterns
indotbins.yaml
now support both:{tag}
: Expands to the full tag name (e.g.,v1.2.3
).{version}
: Expands to the stripped version name (e.g.,1.2.3
).BinSpec.skip_download
) now compares the stored full tag against the latest target full tag.status
,readme
, update summary) now usetag_to_version()
to display the more conventional stripped version number (e.g.,1.2.3
), even though the full tag is stored internally.Impact:
versions.json
file has changed. (Note: Since there are no users, this isn't a breaking change in practice, but it's a format evolution).{tag}
and{version}
inasset_patterns
for optimal matching.This change provides a more robust foundation for managing tool states accurately and paving the way for future enhancements.