Skip to content

Commit

Permalink
Updating genbuild to include commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
RaptureCore committed Mar 31, 2018
1 parent 62ccd8d commit b753092
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions share/genbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/
RAWDESC=$(git describe --abbrev=0 2>/dev/null)
if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC 2>/dev/null)" ]; then
git diff-index --quiet HEAD -- && DESC=$RAWDESC
fi

# otherwise generate suffix from git, i.e. string like "59887e8-dirty"

#add commit hash to build name
SUFFIX=$(git rev-parse --short HEAD)
else
# otherwise generate suffix from git, i.e. string like "59887e8-dirty"

git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty"

# get a string like "2012-04-10 16:27:19 +0200"
LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")"
fi
fi

if [ -n "$DESC" ]; then
Expand Down

0 comments on commit b753092

Please sign in to comment.