Merge pull request #125 from hnyman/cc_getver

CC15.05: scripts/getver.sh: Fix revision numbering (for Github-based repo)
master
Zoltan Herpai 2017-10-23 11:13:58 +02:00 committed by GitHub
commit 5f0540c370
1 changed files with 4 additions and 4 deletions

View File

@ -17,9 +17,9 @@ try_svn() {
}
try_git() {
[ -e .git ] || return 1
REV="$(git log | grep -m 1 git-svn-id | awk '{ gsub(/.*@/, "", $0); print $1 }')"
REV="${REV:+r$REV}"
git rev-parse --git-dir >/dev/null 2>&1 || return 1
REV="$(git describe --tags | sed "s/v15.05.1-\([0-9]*\)-.*/\1/g")"
REV="${REV:+r$((REV+49254))}"
[ -n "$REV" ]
}
@ -30,5 +30,5 @@ try_hg() {
[ -n "$REV" ]
}
try_version || try_svn || try_git || try_hg || REV="unknown"
try_version || try_git || try_hg || REV="unknown"
echo "$REV"