This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5cba347  In prepare_release.sh add a pre-condition check that the 
release requested matches the build.xml's base.version
5cba347 is described below

commit 5cba347638527361d4123d371ba93ec51ccfeae7
Author: Mick Semb Wever <[email protected]>
AuthorDate: Sun Jun 19 18:09:57 2022 +0200

    In prepare_release.sh add a pre-condition check that the release requested 
matches the build.xml's base.version
---
 cassandra-release/prepare_release.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cassandra-release/prepare_release.sh 
b/cassandra-release/prepare_release.sh
index bc25f6b..3cab8d0 100755
--- a/cassandra-release/prepare_release.sh
+++ b/cassandra-release/prepare_release.sh
@@ -122,6 +122,12 @@ then
     exit 1
 fi
 
+build_xml_version="$(grep 'property\s*name=\"base.version\"' build.xml |sed 
-ne 's/.*value=\"\([^"]*\)\".*/\1/p')"
+if [ "${release}" != "${build_xml_version}" ] ; then
+    echo "The release requested ${release} does not match build.xml's version 
${build_xml_version}"
+    exit 1
+fi
+
 if curl --output /dev/null --silent --head --fail 
"https://dist.apache.org/repos/dist/dev/cassandra/${release}"; ; then
     echo "The release candidate for ${release} is already staged at 
https://dist.apache.org/repos/dist/dev/cassandra/${release}";
     exit 1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to