Repository navigation
[fix][build] Fix stage-release.sh for the Gradle build - #26017
Merged
Merged
Conversation
### Motivation The release staging script `src/stage-release.sh` was left pointing at the Maven layout after the build migrated to Gradle, so it no longer works: - it called `./get-project-version.py`, which was removed during the migration; - it copied the binary distributions from `distribution/*/target/`, but Gradle writes them to `distribution/*/build/distributions/`; - it copied an IO connectors distribution that the Gradle build no longer produces. ### Modifications - Read the version from `gradle.properties` via `get-pulsar-version.sh`. - Copy the server, offloaders and shell binary distributions from the Gradle output directory `build/distributions` instead of the Maven `target`. - Drop the IO connectors copy; `pulsar-connectors` is released separately. The source release is unchanged: it is still produced by `git archive` of `HEAD`, which already includes everything needed to build from source (the Gradle wrapper, `build-logic`, `settings.gradle.kts`, `gradle.properties`, the version catalog and all module build files). This was verified by extracting the generated source tarball and configuring the build from it with `./gradlew help --offline`. Assisted-by: Claude Code (Opus 4.8)
lhotari
added a commit
that referenced
this pull request
Jun 13, 2026
The release staging script `src/stage-release.sh` was left pointing at the Maven layout after the build migrated to Gradle, so it no longer works: - it called `./get-project-version.py`, which was removed during the migration; - it copied the binary distributions from `distribution/*/target/`, but Gradle writes them to `distribution/*/build/distributions/`; - it copied an IO connectors distribution that the Gradle build no longer produces. - Read the version from `gradle.properties` via `get-pulsar-version.sh`. - Copy the server, offloaders and shell binary distributions from the Gradle output directory `build/distributions` instead of the Maven `target`. - Drop the IO connectors copy; `pulsar-connectors` is released separately. The source release is unchanged: it is still produced by `git archive` of `HEAD`, which already includes everything needed to build from source (the Gradle wrapper, `build-logic`, `settings.gradle.kts`, `gradle.properties`, the version catalog and all module build files). This was verified by extracting the generated source tarball and configuring the build from it with `./gradlew help --offline`. Assisted-by: Claude Code (Opus 4.8)
merlimat
approved these changes
Jun 13, 2026
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.
Motivation
The release staging script
src/stage-release.shwas left pointing at the Maven layout after the build migrated to Gradle, so it no longer works:./get-project-version.py, which was removed during the migration;distribution/*/target/, but Gradle writes them todistribution/*/build/distributions/;Modifications
gradle.propertiesviaget-pulsar-version.sh.build/distributionsinstead of the Maventarget.pulsar-connectorsis released separately.The source release is left unchanged: it is still produced by
git archiveofHEAD. Because.gitattributesdeclares noexport-ignore, the archive contains every tracked file, which already covers everything needed to build from source (the Gradle wrapper andgradle-wrapper.jar,build-logic,settings.gradle.kts,gradle.properties, the version catalog and all module build files). No.gitignore/.gitattributeschanges are required.Verifying this change
This change is build/release tooling and is not covered by automated tests. It was verified manually:
src/get-pulsar-version.shreturns the expected version fromgradle.properties.git archiveofHEAD) was extracted and the Gradle build configured from the extract alone with./gradlew help --offline, confirming the source release is self-contained.Tar/Ziptask outputs indistribution/{server,offloaders,shell}/build.gradle.kts(build/distributions/apache-pulsar[-offloaders|-shell]-$VERSION-bin.{tar.gz,zip}).Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes