1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-06-24 01:49:36 +02:00

Added NO_GIT_DIRTY variable for generating VERSION.h

This commit is contained in:
Sirius Bakke
2015-07-03 09:08:05 +02:00
parent d79acf4099
commit 6d0c72a373

View File

@@ -19,7 +19,11 @@ GENERATION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION"
# Git may generate version info for us
# May be overridden by setting NO_GIT_VER environment variable
if [ ! -n "${NO_GIT_VER}" ]; then
GIT_VERSION=`git describe --tags --dirty --always`
GIT_DIRTY_FLAG="--dirty"
if [ -n "${NO_GIT_DIRTY}" ]; then
GIT_DIRTY_FLAG=""
fi
GIT_VERSION=`git describe --tags ${GIT_DIRTY_FLAG} --always`
if [ -n "${GIT_VERSION}" ]; then
VERSION=${GIT_VERSION#v}
GENERATION=${VERSION%.*}