mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 12:32:34 +02:00
stick to 7 characters even for modern 'git' version
This commit is contained in:
@@ -45,7 +45,7 @@ fi
|
||||
# exit 1
|
||||
|
||||
GITBRANCH=$(git rev-parse --abbrev-ref HEAD | tr '/' '-')
|
||||
GITVERSION_SHA1=$(git log -1 --format=%h)
|
||||
GITVERSION_SHA1=$(git log -1 --format=%h --abbrev=7)
|
||||
GITVERSION_REV=$(git rev-list HEAD --count)
|
||||
VERSION=${GITBRANCH}.${GITVERSION_REV}.${GITVERSION_SHA1}
|
||||
|
||||
|
@@ -32,7 +32,7 @@ REPO_DATADIR="$REPODIR/data/glest_game"
|
||||
if [ -d "$REPODIR/.git" ] && [ "$(which git 2>/dev/null)" != "" ]; then
|
||||
cd "$REPODIR"
|
||||
if [ "$SOURCE_BRANCH" = "" ]; then SOURCE_BRANCH="$(git branch | awk -F '* ' '/^* / {print $2}')"; fi
|
||||
SOURCE_COMMIT="$(echo "[$(git rev-list HEAD --count).$(git log -1 --format=%h)]")"
|
||||
SOURCE_COMMIT="$(echo "[$(git rev-list HEAD --count).$(git log -1 --format=%h --abbrev=7)]")"
|
||||
fi
|
||||
ARCHIVE_TYPE="tar.xz"
|
||||
SNAPSHOTNAME="mg-binary-$kernel-$architecture"
|
||||
|
@@ -25,14 +25,14 @@ if [ -f "$REPO_DATADIR/.git" ] && [ "$(which git 2>/dev/null)" != "" ]; then
|
||||
DATA_BRANCH="$(git branch | grep '^* ' | awk '{print $2}')"
|
||||
# on macos are problems with more advanced using awk ^
|
||||
DATA_COMMIT_NR="$(git rev-list HEAD --count)"
|
||||
DATA_COMMIT="$(echo "[$DATA_COMMIT_NR.$(git log -1 --format=%h)]")"
|
||||
DATA_COMMIT="$(echo "[$DATA_COMMIT_NR.$(git log -1 --format=%h --abbrev=7)]")"
|
||||
DATA_HASH=$(git log -1 --format=%H)
|
||||
fi
|
||||
if [ -d "$REPODIR/.git" ] && [ "$(which git 2>/dev/null)" != "" ]; then
|
||||
cd "$REPODIR"
|
||||
if [ "$SOURCE_BRANCH" = "" ]; then SOURCE_BRANCH="$(git branch | grep '^* ' | awk '{print $2}')"; fi
|
||||
# on macos are problems with more advanced using awk ^
|
||||
SOURCE_COMMIT="$(echo "[$(git rev-list HEAD --count).$(git log -1 --format=%h)]")"
|
||||
SOURCE_COMMIT="$(echo "[$(git rev-list HEAD --count).$(git log -1 --format=%h --abbrev=7)]")"
|
||||
if [ "$DATA_HASH" = "" ]; then DATA_HASH=$(git submodule status "$REPO_DATADIR" | awk '{print $1}'); fi
|
||||
fi
|
||||
classic_snapshot_for_tests=0
|
||||
|
@@ -44,7 +44,7 @@ if [ "$modifymore" = "yes" ]; then
|
||||
fi
|
||||
if [ "$modifymore" = "yes" ] && [ "$(git status >/dev/null 2>&1; echo "$?")" -eq "0" ]; then
|
||||
# const string GIT_RawRev = "$4446.1a8673f$";
|
||||
GitCommitForRelease="`git rev-list HEAD --count`.`git log -1 --format=%h`";
|
||||
GitCommitForRelease="`git rev-list HEAD --count`.`git log -1 --format=%h --abbrev=7`";
|
||||
echo 'GitCommitForRelease # before:'
|
||||
grep -E '^GitCommitForRelease = "[^"]*";$' "$VERSION_INFO_FILE"
|
||||
grep -E '^ const string GIT_RawRev = "\$[^"$]*\$";$' ../../source/glest_game/facilities/game_util.cpp
|
||||
|
Reference in New Issue
Block a user