Skip to content
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

wildcards/latest for github release? #1

Open
ahornby opened this issue Feb 6, 2024 · 5 comments
Open

wildcards/latest for github release? #1

ahornby opened this issue Feb 6, 2024 · 5 comments

Comments

@ahornby
Copy link

ahornby commented Feb 6, 2024

Congrats on the release!

Any interest in contributions supporting wildcard/latest matching for github releases? e.g. specify a pattern like 7.0.* for bazel, call the github api to see what is available, then download the metadata (hash etc) and content for the latest one matching (currently 7.0.2)

This would allow using dotslash to replace "get and run latest matching X" usages of bazelisk and similar downloader/caching tools.

Essentially would be adding a "find url and other metadata" step for cases where people trust the release stream to do the right thing for them given the pattern

@bolinfest
Copy link
Contributor

Hi @ahornby, if I'm understanding your question correctly, the answer is a definite no.

A key design principal of DotSlash is reproducibility. This is why you have to specify the hash and digest of the artifact.

If a DotSlash file could be defined to mean "run v7.0.* of Bazel," that would mean the behavior of that DotSlash file could change over time even if the content of the file does not change. That will absolutely not be supported.

@ahornby
Copy link
Author

ahornby commented Feb 6, 2024

Is gh release support only present so the gh client can handle login for enterprise or private repos? For public repos the url for the artefact suffices if not doing any pattern matching

@bolinfest
Copy link
Contributor

Yes, I think this is addressed directly in:

https://dotslash-cli.com/docs/dotslash-file/#github-release-provider

@ahornby
Copy link
Author

ahornby commented Feb 7, 2024

Thanks. Perhaps a still immutable way to help people coming from a bazelisk 6.x style pattern matching workflow might be automating the check for matching releases and resulting edit of the dotslash files.

One could list the source release pattern in the dotslash file and have "dotslash update" or similar edit the file based on discovered size/version/hash/name metadata?

@bolinfest
Copy link
Contributor

@ndmitchell is there anything about how we release buck2 internally that can be of use here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants