Skip to content

Fix urls and build commands#120

Open
bbotella wants to merge 3 commits intoapache:trunkfrom
bbotella:fix-analytics-release-script
Open

Fix urls and build commands#120
bbotella wants to merge 3 commits intoapache:trunkfrom
bbotella:fix-analytics-release-script

Conversation

@bbotella
Copy link
Copy Markdown
Contributor

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

@bbotella bbotella requested a review from JeetKunDoug November 10, 2025 19:41
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants