Skip to content

Commit

Permalink
Merge pull request #299 from renaissance-benchmarks/topic/git-const-a…
Browse files Browse the repository at this point in the history
…bbrev

Set length of abbreviated commit id in git describe
  • Loading branch information
lbulej authored Sep 16, 2021
2 parents 75b248a + 5784d13 commit 346a66a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/ci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ROOT_DIR="$(git rev-parse --show-toplevel || realpath "$( dirname "$0" )/../../"
CACHE_DIR="$HOME/.prebuilt"

# Raw version as produced by git
RENAISSANCE_GIT_VERSION=$(git describe --tags --always --dirty=-SNAPSHOT || echo "ci-SNAPSHOT" )
RENAISSANCE_GIT_VERSION=$(git describe --tags --always --abbrev=7 --dirty=-SNAPSHOT || echo "ci-SNAPSHOT" )

# Strip leading 'v' from the git-produced version
RENAISSANCE_VERSION=${RENAISSANCE_GIT_VERSION#v}
Expand Down
2 changes: 1 addition & 1 deletion tools/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ echo ""
# Check that README.md is up-to-date.
echo ":: Running pre-push markdown check ::"

RENAISSANCE_GIT_VERSION=$(git describe --dirty=-SNAPSHOT)
RENAISSANCE_GIT_VERSION=$(git describe --abbrev=7 --dirty=-SNAPSHOT)
RENAISSANCE_VERSION=${RENAISSANCE_GIT_VERSION#v}

java -jar "$ROOT_DIR/target/renaissance-gpl-$RENAISSANCE_VERSION.jar" --readme || \
Expand Down
2 changes: 1 addition & 1 deletion tools/renaissance-jmh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

BASE_DIR="$(dirname "$0")"
ROOT_DIR="$(git -C "$BASE_DIR" rev-parse --show-toplevel)"
RENAISSANCE_GIT_VERSION=$(git -C "$BASE_DIR" describe --dirty=-SNAPSHOT)
RENAISSANCE_GIT_VERSION=$(git -C "$BASE_DIR" describe --abbrev=7 --dirty=-SNAPSHOT)
RENAISSANCE_VERSION=${RENAISSANCE_GIT_VERSION#v}

exec java $JAVA_OPTS -jar "$ROOT_DIR/renaissance-jmh/target/scala-2.12/renaissance-jmh-assembly-$RENAISSANCE_VERSION.jar" "$@"
2 changes: 1 addition & 1 deletion tools/renaissance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

BASE_DIR="$(dirname "$0")"
ROOT_DIR="$(git -C "$BASE_DIR" rev-parse --show-toplevel)"
RENAISSANCE_GIT_VERSION=$(git -C "$BASE_DIR" describe --dirty=-SNAPSHOT)
RENAISSANCE_GIT_VERSION=$(git -C "$BASE_DIR" describe --abbrev=7 --dirty=-SNAPSHOT)
RENAISSANCE_VERSION=${RENAISSANCE_GIT_VERSION#v}

exec java $JAVA_OPTS -jar "$ROOT_DIR/target/renaissance-gpl-$RENAISSANCE_VERSION.jar" "$@"

0 comments on commit 346a66a

Please sign in to comment.