aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildversion.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/buildversion.sh b/scripts/buildversion.sh
index e5ce96c..516aff5 100755
--- a/scripts/buildversion.sh
+++ b/scripts/buildversion.sh
@@ -4,14 +4,18 @@ OUTFILE="$1"
VAR16MODE="$2"
# Extract version info
-if [ -d .git -o -f .git ]; then
- VERSION="`git describe --tags --long --dirty`"
-elif [ -f .version ]; then
- VERSION="`cat .version`"
+if [ -z "$BUILD_VERSION" ]; then
+ if [ -d .git -o -f .git ]; then
+ VERSION="`git describe --tags --long --dirty`"
+ elif [ -f .version ]; then
+ VERSION="`cat .version`"
+ else
+ VERSION="?"
+ fi
+ VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`-`hostname`"
else
- VERSION="?"
+ VERSION="$BUILD_VERSION"
fi
-VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`-`hostname`"
echo "Version: ${VERSION}"
# Build header file