From: Michael Tremer Date: Tue, 11 Feb 2020 14:28:51 +0000 (+0000) Subject: make.sh: Tidy up Git commands X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=36e2e99285e86e46df33933a2783911118a504ce make.sh: Tidy up Git commands No functional changes. Just making them shorter. Signed-off-by: Michael Tremer Signed-off-by: Arne Fitzenreiter --- diff --git a/make.sh b/make.sh index 34cc35f022..ba393bd656 100755 --- a/make.sh +++ b/make.sh @@ -28,15 +28,17 @@ SNAME="ipfire" # Short name VERSION="2.25" # Version number CORE="142" # Core Level (Filename) PAKFIRE_CORE="141" # Core Level (PAKFIRE) -GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Git Branch SLOGAN="www.ipfire.org" # Software slogan CONFIG_ROOT=/var/ipfire # Configuration rootdir NICE=10 # Nice level MAX_RETRIES=1 # prefetch/check loop BUILD_IMAGES=1 # Flash and Xen Downloader KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'` -GIT_TAG=$(git tag | tail -1) # Git Tag -GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit + +# Information from Git +GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" # Git Branch +GIT_TAG="$(git tag | tail -1)" # Git Tag +GIT_LASTCOMMIT="$(git rev-parse --verify HEAD)" # Last commit TOOLCHAINVER=20200108 @@ -518,7 +520,7 @@ prepareenv() { SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS" ;; *) - SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" + SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/${GIT_LASTCOMMIT:0:8}$GIT_STATUS" ;; esac