Open
Conversation
JeetKunDoug
requested changes
Nov 11, 2025
Comment on lines
+154
to
+185
| 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 |
There was a problem hiding this 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.
Comment on lines
+246
to
+255
| 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" |
There was a problem hiding this comment.
I wonder if we should run the build, but not publish, in fake mode? If so you could do something like this:
Suggested change
| 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" | |
| 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix URLs for the emails text on the analytics prepare release script.