You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "bbotella (via GitHub)" <gi...@apache.org> on 2025/11/10 19:41:25 UTC

[PR] Fix urls and build commands [cassandra-builds]

bbotella opened a new pull request, #120:
URL: https://github.com/apache/cassandra-builds/pull/120

   Fix URLs for the emails text on the analytics prepare release script.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Fix urls and build commands [cassandra-builds]

Posted by "JeetKunDoug (via GitHub)" <gi...@apache.org>.
JeetKunDoug commented on code in PR #120:
URL: https://github.com/apache/cassandra-builds/pull/120#discussion_r2515214496


##########
cassandra-analytics-release/prepare_release.sh:
##########
@@ -151,35 +151,38 @@ then
     exit 1
 fi
 
-gradle_properties_version="$(grep ^version= gradle.properties)"
-if [ "${release}" != "${gradle_properties_version#version=}" ] ; then
-    echo "The release requested ${release} does not match gradle.properties's version ${gradle_properties_version}"
-    exit 1
-fi
-
-if curl --output /dev/null --silent --head --fail "https://dist.apache.org/repos/dist/dev/cassandra/cassandra-analytics/${release}" ; then
-    echo "The release candidate for ${release} is already staged at https://dist.apache.org/repos/dist/dev/cassandra/cassandra-analytics/${release}"
-    exit 1
-fi
-
-if curl --output /dev/null --silent --head --fail "https://archive.apache.org/dist/cassandra/cassandra-analytics/${release}" ; then
-    echo "A published release for ${release} is already public at https://archive.apache.org/dist/cassandra/cassandra-analytics/${release}"
-    exit 1
-fi
-
-if curl --output /dev/null --silent --head --fail "https://github.com/apache/cassandra-analytics/tree/${release}-tentative" ; then
-    echo "The release candidate tag for ${release}-tentative is already at https://github.com/apache/cassandra-analytics/tree/${release}-tentative"
-    exit 1
-fi
-
-if curl --output /dev/null --silent --head --fail "https://github.com/apache/cassandra-analytics/tree/cassandra-analytics-${release}" ; then
-    echo "The published release tag for ${release} is already at https://github.com/apache/cassandra-analytics/tree/cassandra-analytics-${release}"
-    exit 1
-fi
-
-if git tag -l | grep -q "${release}-tentative"; then
-    echo "Local git tag for ${release}-tentative already exists"
-    exit 1
+if [ $fake_mode -ne 1 ]
+then
+  gradle_properties_version="$(grep ^version= gradle.properties)"
+  if [ "${release}" != "${gradle_properties_version#version=}" ] ; then
+      echo "The release requested ${release} does not match gradle.properties's version ${gradle_properties_version}"
+      exit 1
+  fi
+
+  if curl --output /dev/null --silent --head --fail "https://dist.apache.org/repos/dist/dev/cassandra/cassandra-analytics/${release}" ; then
+      echo "The release candidate for ${release} is already staged at https://dist.apache.org/repos/dist/dev/cassandra/cassandra-analytics/${release}"
+      exit 1
+  fi
+
+  if curl --output /dev/null --silent --head --fail "https://archive.apache.org/dist/cassandra/cassandra-analytics/${release}" ; then
+      echo "A published release for ${release} is already public at https://archive.apache.org/dist/cassandra/cassandra-analytics/${release}"
+      exit 1
+  fi
+
+  if curl --output /dev/null --silent --head --fail "https://github.com/apache/cassandra-analytics/tree/${release}-tentative" ; then
+      echo "The release candidate tag for ${release}-tentative is already at https://github.com/apache/cassandra-analytics/tree/${release}-tentative"
+      exit 1
+  fi
+
+  if curl --output /dev/null --silent --head --fail "https://github.com/apache/cassandra-analytics/tree/cassandra-analytics-${release}" ; then
+      echo "The published release tag for ${release} is already at https://github.com/apache/cassandra-analytics/tree/cassandra-analytics-${release}"
+      exit 1
+  fi
+
+  if git tag -l | grep -q "${release}-tentative"; then
+      echo "Local git tag for ${release}-tentative already exists"
+      exit 1
+  fi

Review Comment:
   Not sure why this block is prevented from running in "fake" mode (maybe rename it to "dry-run" mode as I think that's a more typical name for this kind of thing)? Everything here is just checking parameters, which seems like something you'd want to do in dry-run mode.



##########
cassandra-analytics-release/prepare_release.sh:
##########
@@ -237,29 +240,36 @@ execute "cd $tmp_dir"
 ## We clone from the original repository to make extra sure we're not screwing, even if that's definitively slower
 execute "git clone $asf_git_repo/cassandra-analytics.git"
 
-echo "Building and uploading artifacts ..." 1>&3 2>&4
-execute "cd $tmp_dir/cassandra-analytics"
-execute "git checkout -b $release-tentative"
-# Build java 11 artifacts and publish
-execute "./scripts/build-dependencies.sh"
-execute "./gradlew --no-daemon -Dorg.gradle.java.home=${java_11_home} clean"
-execute "./gradlew --no-daemon -Pscala=2.12 -P-Dorg.gradle.java.home=${java_11_home} -PforceSigning -Prelease=true -Pversion=${release} assemble publish --stacktrace"
-execute "./gradlew --no-daemon -Pscala=2.13 -Dorg.gradle.java.home=${java_11_home} -PforceSigning -Prelease=true -Pversion=${release} assemble publish --stacktrace"
+if [ $fake_mode -ne 1 ]
+then
 
-echo "Artifacts uploaded, find the staging repository on repository.apache.org, \"Close\" it, and indicate its staging number:" 1>&3 2>&4
-read -p "staging number Scala 2.12, Java 11, Spark 3? " staging_number_212_11_3 1>&3 2>&4
-read -p "staging number Scala 2.13, Java 11, Spark 3? " staging_number_213_11_3 1>&3 2>&4
+  echo "Building and uploading artifacts ..." 1>&3 2>&4
+  execute "cd $tmp_dir/cassandra-analytics"
+  execute "git checkout -b $release-tentative"
+  # Build java 11 artifacts and publish
+  execute "./scripts/build-dependencies.sh"
+  execute "./gradlew --no-daemon -Dorg.gradle.java.home=${java_11_home} clean"
+  execute "./gradlew --no-daemon -Pscala=2.12 -P-Dorg.gradle.java.home=${java_11_home} -PartifactType=common -PforceSigning -Prelease=true -Pversion=${release} assemble publish --stacktrace"
+  execute "./gradlew --no-daemon -Pscala=2.13 -Dorg.gradle.java.home=${java_11_home} -PartifactType=common -PforceSigning -Prelease=true -Pversion=${release} assemble publish --stacktrace"
+  execute "./gradlew --no-daemon -Pscala=2.12 -P-Dorg.gradle.java.home=${java_11_home} -PartifactType=spark -PforceSigning -Prelease=true -Pversion=${release} assemble publish --stacktrace"
+  execute "./gradlew --no-daemon -Pscala=2.13 -Dorg.gradle.java.home=${java_11_home} -PartifactType=spark -PforceSigning -Prelease=true -Pversion=${release} assemble publish --stacktrace"

Review Comment:
   I wonder if we should run the build, but not publish, in fake mode? If so you could do something like this:
   ```suggestion
   tasks="assemble" # don't include publish if we're doing a dry run
   if [ $fake_mode -ne 1 ]
   then
     tasks="assemble publish"
     echo "Building and uploading artifacts ..." 1>&3 2>&4
   else
       echo "Building artifacts but skipping publish (dry-run) ..." 1>&3 2>&4
   fi
   execute "cd $tmp_dir/cassandra-analytics"
   execute "git checkout -b $release-tentative"
   # Build java 11 artifacts and (optionally) publish
   execute "./scripts/build-dependencies.sh"
   execute "./gradlew --no-daemon -Dorg.gradle.java.home=${java_11_home} clean"
   execute "./gradlew --no-daemon -Pscala=2.12 -P-Dorg.gradle.java.home=${java_11_home} -PartifactType=common -PforceSigning -Prelease=true -Pversion=${release} $tasks --stacktrace"
   execute "./gradlew --no-daemon -Pscala=2.13 -Dorg.gradle.java.home=${java_11_home} -PartifactType=common -PforceSigning -Prelease=true -Pversion=${release} $tasks --stacktrace"
   execute "./gradlew --no-daemon -Pscala=2.12 -P-Dorg.gradle.java.home=${java_11_home} -PartifactType=spark -PforceSigning -Prelease=true -Pversion=${release} $tasks --stacktrace"
   execute "./gradlew --no-daemon -Pscala=2.13 -Dorg.gradle.java.home=${java_11_home} -PartifactType=spark -PforceSigning -Prelease=true -Pversion=${release} $tasks --stacktrace"
   ```
   Note you'd need to include a bit more below in another if/else (as we obviously wouldn't want to actually do the `svn` stuff if it's a dry-run, for example)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org