mirror of https://github.com/GNOME/gimp.git
app: generate git-version.h regardless of branch
Previously, git-version.h always recorded the latest commit on the master branch. This change should record the current commit (which is what gets built) regardless of the branch. I've checked that it does "the right thing" regarding multi-parent merges by checking out such a merge commit, generating git-version.h and comparing it to the commit sha1 in the log.
This commit is contained in:
parent
6909fd5dc3
commit
222ffd2360
|
@ -281,7 +281,7 @@ gimp-console.rc.o: gimp.rc
|
|||
# in which case the git-version.h we ship is correct.
|
||||
git-version.h: update-git-version-header
|
||||
@if test -d "$(top_srcdir)/.git"; then \
|
||||
echo "#define GIMP_GIT_VERSION \"`git show-ref --hash refs/heads/master`\"" > "$@.tmp"; \
|
||||
echo "#define GIMP_GIT_VERSION \"`git log -n1 --reverse --pretty=%H`\"" > "$@.tmp"; \
|
||||
elif test ! -f "$@"; then \
|
||||
echo "#define GIMP_GIT_VERSION \"Unknown, shouldn't happen\"" > "$@.tmp"; \
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue