diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-10-13 19:30:53 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-10-13 19:30:53 +0800 |
commit | 7af57d2e6f9066390e4664ba8d261e75b3d3f26f (patch) | |
tree | bf4f71991f9123925a688e1d0d23076aea793feb | |
parent | 3d7b4f686a3669663fe7c3cb2fb0b8ee7d558f4c (diff) |
git-version: remove -g{sha} unconditionally
-rwxr-xr-x | git-version.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/git-version.sh b/git-version.sh index 8f5cdb33b..1214ea824 100755 --- a/git-version.sh +++ b/git-version.sh @@ -48,11 +48,9 @@ esac full_date="$month $day$suffix, $year" sha="$(git describe --abbrev=1)" -if [ "$(git branch --show-current)" = "trunk" ]; then - sha=$(echo "$sha" | sed 's/-g[^-]*$//') -fi -version="$sha" -versiond="$sha-systemd" +rev=$(echo "$sha" | sed 's/-g[^-]*$//') +version="$rev" +versiond="$rev-systemd" if [ "$(git diff HEAD | wc -l)" != "0" ]; then version="$version+" |