diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-11 12:06:30 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-11 12:15:46 -0400 |
commit | 23cf9eb04f41d86ab98050eed6e016b98d2c99fe (patch) | |
tree | d6b9a76582f470e429cc5c34fe3c21e03e2e5b13 | |
parent | ed2aae7ab3b9e99f66bdaaae26320183dfad4664 (diff) |
Refine the build id string
We use git describe to get the SHA1 so that we append -dirty for dirty
worktrees and include the HEAD commit subject and date.
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/compositor.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a94128c..8b633f3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,7 @@ weston_SOURCES = \ weston-egl-ext.h git-version.h : .FORCE - echo "#define WESTON_SHA1 \"$(shell git --git-dir=$(top_srcdir)/.git show-ref --head --hash=20 HEAD)\"" > $@-new + echo "#define BUILD_ID \"$(shell git --work-tree=$(top_srcdir) describe --always --dirty) $(shell git --work-tree=$(top_srcdir) log -1 --format='%s (%ci)')\"" > $@-new cmp -s $@ $@-new || cp $@-new $@ rm $@-new diff --git a/src/compositor.c b/src/compositor.c index aa862cd..26c9a95 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3220,7 +3220,7 @@ int main(int argc, char *argv[]) STAMP_SPACE "Bug reports to: %s\n" STAMP_SPACE "Build: %s\n", PACKAGE_STRING, PACKAGE_URL, PACKAGE_BUGREPORT, - WESTON_SHA1); + BUILD_ID); log_uname(); display = wl_display_create(); |