product-packager
product-packager copied to clipboard
Provide a way to know which version I'm running
I have gdquest-build-course on my path, and I do not know if there are bugfixes, which means I should download a newer version.
Ideally, this is a feature request for an update feature, but a good first step would be to include an automatic versioning; hash, date, possibly tag, to appear in the message when running with --help
and/or with --version
.
A more advanced feature would, when running the executable, compare stored version with the release
branch on Github, and if necessary, dump the link to the artifacts page with a "new version available!".
There should def. be a version option, and yeah an API check would be good. Do you know the API call to make? If so it'd be pretty quick to add.
I think a simple call to https://api.github.com/repos/GDQuest/product-packager/tags
works, no API key needed.
For example:
curl https://api.github.com/repos/GDQuest/learn-gdscript/tags | jq -c 'sort_by(.name) | .[].name'
seems to work.
Note: in this example I'm just comparing strings but you'd probably want to do something a bit more involved if we're going to use semver versioning (no problem if we just use incremental versioning)