Fix util/mktar.sh to use the new VERSION information
authorRichard Levitte <levitte@openssl.org>
Thu, 27 Feb 2020 00:09:23 +0000 (01:09 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 28 Feb 2020 11:19:16 +0000 (12:19 +0100)
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/11190)

util/mktar.sh

index 6d5df8528dcff8323bdfc92ce976246a816b1326..b58fbe9d314ee5e0e99bfae0e820b507e62c650e 100755 (executable)
@@ -8,7 +8,11 @@
 
 HERE=`dirname $0`
 
-version=`grep 'OPENSSL_VERSION_TEXT  *"OpenSSL' $HERE/../include/openssl/opensslv.h | sed -e 's|.*"OpenSSL ||' -e 's| .*||'`
+# Get all version data as shell variables
+. $HERE/../VERSION
+
+if [ -n "$PRE_RELEASE_TAG" ]; then PRE_RELEASE_TAG=-$PRE_RELEASE_TAG; fi
+version=$MAJOR.$MINOR.$PATCH$PRE_RELEASE_TAG$BUILD_METADATA
 basename=openssl
 
 NAME="$basename-$version"