product-packager icon indicating copy to clipboard operation
product-packager copied to clipboard

Provide a way to know which version I'm running

Open Xananax opened this issue 2 years ago • 2 comments

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!".

Xananax avatar Jun 13 '22 13:06 Xananax

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.

NathanLovato avatar Jun 13 '22 13:06 NathanLovato

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)

Xananax avatar Jun 13 '22 15:06 Xananax