-
Notifications
You must be signed in to change notification settings - Fork 508
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
feat: Added two github helper for retrieving specific release instead of latest release. #3883
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. Please add a new bucket for the new state, rather than mixing everything in a single bucket.
318e2e0
to
644ec07
Compare
Thank you, this looks excellent. I want to do a final review tomorrow, but it all looks good. If you want to run the full set of checks locally (e.g. to fix the whitespace errors) you can run |
What do you think about allowing some "magic" value for downloading the latest release ? Use case: some-external:
url: {{ gitHubReleaseAssetURL "user/repo" .data.versions.repo (printf "repo-*-%s-unknown-linux-musl.tar.gz" $arch) | quote }}
----
data.yaml:
data:
versions:
repo: latest # Fetch the lastest release (masks any "latest" tag existing on the releases)
chezmoi: v2.51.0 Maybe just something like: func (c *Config) gitHubReleaseAssetURLTemplateFunc(ownerRepo, version, pattern string) string {
if version == "latest" {
return c.gitHubLatestReleaseAssetURLTemplateFunc(ownerRepo, pattern)
} I fixed the whitespace issues (and reworded a bit) |
644ec07
to
d5d5206
Compare
There's |
The function name in the new tests is incorrect. |
Thanks, I'm fixing this. The tests weren't running because they only run when the |
I've added a new feature that lets users download specific versions of GitHub releases, eg:
I included a quick test and doc.
Feel free to tell me if anything else needs adjustments.