-
Notifications
You must be signed in to change notification settings - Fork 67
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
Building from source release displays git as version number #1225
Comments
oh that's a tough one... I'm not sure how we could go about checking if a given download zip file matches the contents of a given release |
@limpkin I wouldn't think that's a solution, rather there would be a version somewhere in the code, that when building would display whatever version was used when building. I've not gone through to check. It's not an issue that the version shows git more of an annoyance after building a release like the one listed. |
One way of addressing this is only setting APP_VERSION if it's not already defined. Then you could pass your own custom define at build time, setting it based on your current git HEAD. Currently I use |
Another way would be to use This allows git to automatically inject the current tag in given files, when the source is generated (for instance when downloading from github): // in src/version.h
#define APP_VERSION "$Format:%(describe:tags)$" Example outputs: // when exactly on a tag
#define APP_VERSION "v1"
// previous tag: v1, 1 commit on top; current commit: d935e6a (with a "g" prefix, for "git")
#define APP_VERSION "v1-1-gd935e6a" |
This would be very useful. It should be possible to do this using qmake DEFINES and CONFIG. |
it seems our build system does overwrite version.h, so I'm open to any idea... simply make a PR for review |
Expected behaviour
Display the correct version number as release tag indicates under About
Version: 1.03.0
Actual behaviour
Download https://github.com/mooltipass/moolticute/archive/refs/tags/v1.03.0.zip and build according to instructions.
Start Moolticute
Navigate to About
Version: git
Moolticute Version
1.03.0 release
Operating System
Void Linux
Mooltipass Device
The Mooltipass Mini BLE
The text was updated successfully, but these errors were encountered: