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

Allow to use the 'latest' release (with a named asset) #9

Closed
carstingaxion opened this issue Jun 3, 2024 · 1 comment · Fixed by #10
Closed

Allow to use the 'latest' release (with a named asset) #9

carstingaxion opened this issue Jun 3, 2024 · 1 comment · Fixed by #10

Comments

@carstingaxion
Copy link
Contributor

Hello @stoph ,

thank you for providing this great service!

Today I wanted to use it within a blueprint.json to reference the latest release, without any need to change numbers regularly. But unfortunately only numbered releases seem to work. Like this example, where 0.28.0 is indeed the latest.

⛔ https://github-proxy.com/proxy/?repo=GatherPress/gatherpress&release=latest&asset=gatherpress.zip
✅ https://github-proxy.com/proxy/?repo=GatherPress/gatherpress&release=0.28.0&asset=gatherpress.zip

I described it like this in the PR with our use-case:

Internally github-proxy.com uses:

$url = "https://github.com/$repo/releases/download/$release/$asset";

which works fine with numbered, but not the latest release.

grafik

Acording to download - Is there a link to GitHub for downloading a file in the latest release of a repository? - Stack Overflow the url template needs some change.

$url = "https://github.com/$repo/releases/download/$release/$asset";

Following this scheme, I'm able to download both assets successfully.

✅ https://github.com/GatherPress/gatherpress/releases/download/0.28.0/gatherpress.zip
✅ https://github.com/GatherPress/gatherpress/releases/latest/download/gatherpress.zip

Hoping, you are able & willing to make this change.
Best regards carsten

@colorful-tones
Copy link

This would be super helpful. I was just about to go this route for my upcoming WP Dev Blog post and I wanted to utilize a Blueprint that references my latest release. 🚀

@stoph stoph closed this as completed in #10 Jun 19, 2024
@stoph stoph closed this as completed in 634de26 Jun 19, 2024
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

Successfully merging a pull request may close this issue.

2 participants