add git ref to the version suffix

This commit is contained in:
c9s 2021-12-07 13:56:51 +08:00
parent 0abd551f1c
commit 533a0259a0

View File

@ -1,6 +1,7 @@
#!/bin/bash
PACKAGE_NAME=version
REF=$(git show -s --format=%h -1)
VERSION=$VERSION-$REF
if [[ -z $VERSION ]] ; then
VERSION=$(git describe --tags)
@ -13,4 +14,6 @@ package $PACKAGE_NAME
const Version = "${VERSION}"
const VersionGitRef = "${REF}"
END