From: Wolfgang Stöggl Date: Tue, 15 Mar 2022 17:13:35 +0000 (+0100) Subject: rrdtool-release: Create NUMVERS from VERSION file X-Git-Tag: v1.9.0~38^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1161%2Fhead;p=thirdparty%2Frrdtool-1.x.git rrdtool-release: Create NUMVERS from VERSION file In the script rrdtool-release, NUMVERS has been read from the configure file so far, which may not be up-to-date. Generate NUMVERS from the VERSION file instead. This ensures that only one source is used vor the version - the VERSION file. Use the same perl command for creating NUMVERS, as in configure.ac --- diff --git a/rrdtool-release b/rrdtool-release index 570b6872..8c92c884 100755 --- a/rrdtool-release +++ b/rrdtool-release @@ -2,7 +2,7 @@ # shellcheck disable=SC2086,SC2046,SC2029 set -e VERSION=$(cat VERSION) -NUMVERS=$(perl -n -e 'm/NUMVERS=(\d+\.\d+)/ && print $1' configure) +NUMVERS=$(perl -n -e 'my @x=split /\./;printf "%d.%d%03d", @x' VERSION) CURRENT_YEAR=$(date +"%Y") set -x perl -i -p -e 's/^\$VERSION.+/\$VERSION='$NUMVERS';/' bindings/perl-*/*.pm