-
Notifications
You must be signed in to change notification settings - Fork 41
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
Added build number generation [#255]. #334
Added build number generation [#255]. #334
Conversation
Build numbers are now generated from git. I'm not yet certain how portable this solution is, though. Tested on Linux; not sure if this is compatible with Windows and/or OSX.
You could use 2456 as a fallback build number:
|
If one adds a fallback, I'd prefer |
on OS X it should work fine, as that's just unix, however I'm not sure if the comparison to /dev/null would work on Windows, as that path doesn't exist. |
Hm. Probably it would work without it (as it shouldn't change the overall exit code, should it?). I personally would prefer that anyways, as it would then at least log that there has been an issue (command not found / git directory missing / ...). |
Doesn't /dev/null exist in Cygwin? |
We build in msys, not in cygwin. Cygwin is not capable of building real Windows applications, any application built through it requires a cygwin runtime to be installed (which is obviously not what we want for end users). Within msys, |
I can't get building on Windows to work, so hopefully somebody else (like @AntoineTurmel ) can test build this patch. |
Added build number generation [#255].
Build numbers are now generated from git. I'm not yet certain how portable this
solution is, though. Tested on Linux; not sure if this is compatible with
Windows and/or OSX.
It will certainly break / look terrible if the user has no git installed (we could work around this, but I think that is fine).
I'm not pushing directly, as I want somebody to test this on Windows and/or OSX first (or telling me to merge so it is not my fault if it breaks :P).