]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
rrdtool-release: Create NUMVERS from VERSION file 1161/head
authorWolfgang Stöggl <c72578@yahoo.de>
Tue, 15 Mar 2022 17:13:35 +0000 (18:13 +0100)
committerWolfgang Stöggl <c72578@yahoo.de>
Tue, 15 Mar 2022 17:13:35 +0000 (18:13 +0100)
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

rrdtool-release

index 570b6872b44299b43c8d753fae1b2727091e6694..8c92c88445ef324645d9bf24dc567b15b9695726 100755 (executable)
@@ -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