-
Notifications
You must be signed in to change notification settings - Fork 40
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
Get the version number using git tags #128
Conversation
this will fail on windows or if we build from the github tarball |
It works on Windows, I specifically modified the code so that it would. Why would we build from the github tarball? |
@nbelakovski, thank you for proposing this. Ping me when both you and @jschueller think it is ready. |
it wont work on windows without bash support, why not call directly the git command from cmake instead ? |
also it should work from the tarball, macports already uses it, and so will linux distro usually |
e1be429
to
2c0345b
Compare
f26e901
to
cebf464
Compare
I changed it to use I also learned about I validated that the .git-archival.txt file is set up correctly by performing the following actions on my machine (I obtained the githash from going into the actions and looking at the output of the clone repository action): $ curl -L https://api.github.com/repos/libprima/prima/tarball/9a0485ea -o myarchive.tgz
$ tar xzf myarchive.tgz
$ cd libprima-prima-9a0485e
$ cat .git-archival.txt
v0.7.2-162-g9a0485ea5 Note that the above commands will return a blank output on forked repos since they do not copy tags by default. |
cebf464
to
95cc410
Compare
This lets us avoid having a hardcoded file in the repo and having to update it for a release. This way releases can be done simply by tagging the appropriate commit and rebuilding. This will be useful for when we publish packages, since it lets us publish a package every time we run CI and not have it conflict with or overwrite the latest package.
95cc410
to
05083c1
Compare
Hi @nbelakovski and @jschueller , is the PR ready? Thank you. |
This lets us avoid having a hardcoded file in the repo and having to update it for a release. This way releases can be done simply by tagging the appropriate commit and rebuilding.
This will be useful for when we publish packages, since it lets us publish a package every time we run CI and not have it conflict with or overwrite the latest package.