Skip to content
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

Conversation

rsjtdrjgfuzkfg
Copy link
Member

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).

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.
@darealshinji
Copy link
Contributor

You could use 2456 as a fallback build number:

BuildNumber=`git describe --long --always --dirty --abbrev=10 2>/dev/null | echo 2456`

@rsjtdrjgfuzkfg
Copy link
Member Author

If one adds a fallback, I'd prefer unknown (show that something is wrong) or 0 (equal to non-official builds) over 2456; I can add that. However, I still don't know if the whole thing will work on Windows / OSX...

@freaktechnik
Copy link
Member

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.

@rsjtdrjgfuzkfg
Copy link
Member Author

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 / ...).

@darealshinji
Copy link
Contributor

Doesn't /dev/null exist in Cygwin?

@rsjtdrjgfuzkfg
Copy link
Member Author

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, /dev/null is available, but only for tools aware of it iirc. So this mainly depends on whether this file is evaluated with bash or something unixy, or through some M$-Make-Tool (we use Visual Studio's compilers and stuff on Windows).

@freaktechnik
Copy link
Member

I can't get building on Windows to work, so hopefully somebody else (like @AntoineTurmel ) can test build this patch.

@freaktechnik
Copy link
Member

Works for me on windows, though I had to add git to my mozilla-build path. Should we check for git's presence if --enable-official or --enable-nightly is set?

Proof:
screenshot 2015-05-11 14 28 05

freaktechnik added a commit that referenced this pull request May 11, 2015
@freaktechnik freaktechnik merged commit b9d22ab into nightingale-media-player:sb-trunk-oldxul May 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants