Contextualist / glare

gracefully download (latest) releases from GitHub
76 stars 20 forks source link

Support version_tag #1

Closed DrSensor closed 5 years ago

DrSensor commented 5 years ago

Thanks for creating this service, really handy when using on Dockerfile via ADD 😍

How about supporting release tag too? For example release_tag=1.24.0:

https://glare.now.sh/dhall/dhall-haskell/${release_tag}/dhall-bash-.*-x86_64-linux

will automatically map too https://github.com/dhall-lang/dhall-haskell/releases/download/1.24.0/dhall-bash-1.0.21-x86_64-linux.tar.bz2

References

https://github.com/dhall-lang/dhall-haskell/releases

Contextualist commented 5 years ago

Hi DrSensor, thanks for your feature request!

If I understand correctly, you want to have version control on a multi-package repository, and you only care about the version of the main package. Wildcard on asset names is helpful in this case, but imposing a version control actually deviates from the original idea of this project: as you see, glare stands for "get latest releases."

However, I still think that such step is worth taking. In fact, you inspire me to add a more general feature: semver matching for release_tag. This gives user freedom to choose how much constraint to impose on versioning:

For the place of versioning in the URL, I'm considering the NPM flavor, i.e.

That's my thought so far. Any inputs are welcome!

Contextualist commented 5 years ago

I just put up a draft implementation. Please try it out at endpoint:

https://glare-4h3h2kvyy.now.sh

e.g. https://glare-4h3h2kvyy.now.sh/dhall/dhall-haskell@1.24.0/bash.*linux

I'll be grateful to take any feedback, and once that's polished and documented, I'll merge the changes and deploy it on glare.now.sh.