]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Update the Rust library version when generating a tarball 16167/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 23 Sep 2025 12:54:43 +0000 (14:54 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 23 Sep 2025 13:09:13 +0000 (15:09 +0200)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/meson-dist-script.sh
pdns/recursordist/rec-rust-lib/rust/Cargo.toml

index f196c38a797bdb18ba76f8f5258e3e254a667b13..55bae65435327e78653ad5c60164e0482d25d186 100755 (executable)
@@ -5,6 +5,11 @@ echo PWD=$(pwd)
 echo MESON_SOURCE_ROOT=$MESON_SOURCE_ROOT
 echo MESON_PROJECT_DIST_ROOT=$MESON_PROJECT_DIST_ROOT
 
+if [ -z "${BUILDER_VERSION}" ]; then
+    echo "BUILDER_VERSION is not set" >&2
+    exit 1
+fi
+
 cd "$MESON_PROJECT_DIST_ROOT"
 
 # Get all symlinks
@@ -25,6 +30,8 @@ echo Running autoreconf -vi so distfile is still usable for autotools building
 # Run autoconf for people using autotools to build, this creates a configure sc
 autoreconf -vi
 rm -rf "$MESON_PROJECT_DIST_ROOT"/autom4te.cache
+echo Updating the version of the Rust library to ${BUILDER_VERSION}
+"$MESON_SOURCE_ROOT"/../../builder-support/helpers/update-rust-library-version.py "$MESON_PROJECT_DIST_ROOT"/rec-rust-lib/rust/Cargo.toml recrust ${BUILDER_VERSION}
 
 cd "$MESON_PROJECT_BUILD_ROOT"
 
index 2d89e22ccdef12ba9c9ae5183c0c887751c88280..c14bfa0ee940a5a425526d766f93ae9b687e5f4b 100644 (file)
@@ -1,8 +1,12 @@
 [package]
 name = "recrust"
+edition = "2021"
 # Convention: major/minor is equal to rec's major/minor
+# Note that this line will be automatically updated to the value
+# BUILDER_VERSION when a release tarball is built
+# See builder-support/helpers/update-rust-library-version.py
+# called from meson-dist-script.sh
 version = "5.4.0"
-edition = "2021"
 
 [lib]
 name = "recrust"