Fix commit version for non-git versions

This commit is contained in:
Sebastiaan Lokhorst
2016-10-21 12:27:06 +02:00
parent 0e6b46db4d
commit c810f76c11
3 changed files with 21 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
#!/bin/sh
SNV_VERSION=`git show -s --format=%h`
echo -n "4.0+git$SNV_VERSION"
BASE_VERSION="4.0"
if [ -d .git ]; then
GIT_COMMIT=`git show -s --format=%h`
echo -n "$BASE_VERSION+git$GIT_COMMIT"
else
echo -n "$BASE_VERSION"
fi