Skip to content

Commit

Permalink
GH-44828: [Java][Release] Remove Java from release scripts (#44854)
Browse files Browse the repository at this point in the history
### Rationale for this change
Java has been moved to its own repo.

### What changes are included in this PR?
Remove Java/Maven from dev/release.

### Are these changes tested?

N/A

### Are there any user-facing changes?

No
* GitHub Issue: #44828

Authored-by: David Li <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
lidavidm authored Dec 4, 2024
1 parent 50f2d6e commit fb8e812
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 411 deletions.
28 changes: 0 additions & 28 deletions dev/release/01-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,34 +311,6 @@ def test_version_pre_tag
]
end

Dir.glob("java/**/pom.xml") do |path|
version = "<version>#{@snapshot_version}</version>"
lines = File.readlines(path, chomp: true)
target_lines = lines.grep(/#{Regexp.escape(version)}/)
hunks = []
target_lines.each do |line|
new_line = line.gsub(@snapshot_version) do
@release_version
end
hunks << [
"-#{line}",
"+#{new_line}",
]
end
tag = "<tag>main</tag>"
target_lines = lines.grep(/#{Regexp.escape(tag)}/)
target_lines.each do |line|
new_line = line.gsub("main") do
"apache-arrow-#{@release_version}"
end
hunks << [
"-#{line}",
"+#{new_line}",
]
end
expected_changes << {hunks: hunks, path: path}
end

Dir.glob("ruby/**/version.rb") do |path|
version = " VERSION = \"#{@snapshot_version}\""
new_version = " VERSION = \"#{@release_version}\""
Expand Down
23 changes: 11 additions & 12 deletions dev/release/02-source-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def source(*targets)
targets.each do |target|
env["SOURCE_#{target}"] = "1"
end
sh(env, @tarball_script, @release_version, "0")
sh(env, @tarball_script, @release_version, "0")
output = sh(env, @script, @release_version, "0")
sh("tar", "xf", @archive_name)
output
Expand Down Expand Up @@ -143,13 +143,13 @@ def test_vote
#{@current_commit} [2]
The source release rc0 is hosted at [3].
The binary artifacts are hosted at [4][5][6][7][8][9][10][11].
The changelog is located at [12].
The binary artifacts are hosted at [4][5][6][7][8][9][10].
The changelog is located at [11].
Please download, verify checksums and signatures, run the unit tests,
and vote on the release. See [13] for how to validate a release candidate.
and vote on the release. See [12] for how to validate a release candidate.
See also a verification result on GitHub pull request [14].
See also a verification result on GitHub pull request [13].
The vote will be open for at least 72 hours.
Expand All @@ -164,13 +164,12 @@ def test_vote
[5]: https://apache.jfrog.io/artifactory/arrow/amazon-linux-rc/
[6]: https://apache.jfrog.io/artifactory/arrow/centos-rc/
[7]: https://apache.jfrog.io/artifactory/arrow/debian-rc/
[8]: https://apache.jfrog.io/artifactory/arrow/java-rc/#{@release_version}-rc0
[9]: https://apache.jfrog.io/artifactory/arrow/nuget-rc/#{@release_version}-rc0
[10]: https://apache.jfrog.io/artifactory/arrow/python-rc/#{@release_version}-rc0
[11]: https://apache.jfrog.io/artifactory/arrow/ubuntu-rc/
[12]: https://github.com/apache/arrow/blob/#{@current_commit}/CHANGELOG.md
[13]: https://arrow.apache.org/docs/developers/release_verification.html
[14]: #{verify_pr_url || "null"}
[8]: https://apache.jfrog.io/artifactory/arrow/nuget-rc/#{@release_version}-rc0
[9]: https://apache.jfrog.io/artifactory/arrow/python-rc/#{@release_version}-rc0
[10]: https://apache.jfrog.io/artifactory/arrow/ubuntu-rc/
[11]: https://github.com/apache/arrow/blob/#{@current_commit}/CHANGELOG.md
[12]: https://arrow.apache.org/docs/developers/release_verification.html
[13]: #{verify_pr_url || "null"}
VOTE
end
end
23 changes: 11 additions & 12 deletions dev/release/02-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ echo "Using commit $release_hash"
tarball=apache-arrow-${version}.tar.gz

if [ ${SOURCE_DOWNLOAD} -gt 0 ]; then
# Wait for the release candidate workflow to finish before attempting
# Wait for the release candidate workflow to finish before attempting
# to download the tarball from the GitHub Release.
. $SOURCE_DIR/utils-watch-gh-workflow.sh ${tag} "release_candidate.yml"
rm -f ${tarball}
Expand Down Expand Up @@ -163,13 +163,13 @@ This release candidate is based on commit:
${release_hash} [2]
The source release rc${rc} is hosted at [3].
The binary artifacts are hosted at [4][5][6][7][8][9][10][11].
The changelog is located at [12].
The binary artifacts are hosted at [4][5][6][7][8][9][10].
The changelog is located at [11].
Please download, verify checksums and signatures, run the unit tests,
and vote on the release. See [13] for how to validate a release candidate.
and vote on the release. See [12] for how to validate a release candidate.
See also a verification result on GitHub pull request [14].
See also a verification result on GitHub pull request [13].
The vote will be open for at least 72 hours.
Expand All @@ -184,13 +184,12 @@ The vote will be open for at least 72 hours.
[5]: https://apache.jfrog.io/artifactory/arrow/amazon-linux-rc/
[6]: https://apache.jfrog.io/artifactory/arrow/centos-rc/
[7]: https://apache.jfrog.io/artifactory/arrow/debian-rc/
[8]: https://apache.jfrog.io/artifactory/arrow/java-rc/${version}-rc${rc}
[9]: https://apache.jfrog.io/artifactory/arrow/nuget-rc/${version}-rc${rc}
[10]: https://apache.jfrog.io/artifactory/arrow/python-rc/${version}-rc${rc}
[11]: https://apache.jfrog.io/artifactory/arrow/ubuntu-rc/
[12]: https://github.com/apache/arrow/blob/${release_hash}/CHANGELOG.md
[13]: https://arrow.apache.org/docs/developers/release_verification.html
[14]: ${verify_pr_url}
[8]: https://apache.jfrog.io/artifactory/arrow/nuget-rc/${version}-rc${rc}
[9]: https://apache.jfrog.io/artifactory/arrow/python-rc/${version}-rc${rc}
[10]: https://apache.jfrog.io/artifactory/arrow/ubuntu-rc/
[11]: https://github.com/apache/arrow/blob/${release_hash}/CHANGELOG.md
[12]: https://arrow.apache.org/docs/developers/release_verification.html
[13]: ${verify_pr_url}
MAIL
echo "---------------------------------------------------------"
fi
153 changes: 0 additions & 153 deletions dev/release/06-java-upload.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion dev/release/post-04-website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ current:
mirrors: 'https://www.apache.org/dyn/closer.lua/arrow/arrow-${version}/'
tarball-name: 'apache-arrow-${version}.tar.gz'
tarball-url: 'https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/arrow-${version}/apache-arrow-${version}.tar.gz'
java-artifacts: 'https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.arrow%22%20AND%20v%3A%22${version}%22'
asc: '${apache_download_url}/arrow/arrow-${version}/apache-arrow-${version}.tar.gz.asc'
sha256: '${apache_download_url}/arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha256'
sha512: '${apache_download_url}/arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha512'
Expand Down
3 changes: 0 additions & 3 deletions dev/release/post-10-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ done
versioned_paths+=("docs/dev/")
rm -rf docs/dev/
if [ "$is_major_release" = "yes" ] ; then
# copy the current stable docs to temporary directory
# (remove java reference to reduce size)
rm -rf docs/java/reference/
cp -r docs/ docs_temp/
fi
# delete current stable docs and restore all previous versioned docs
Expand Down
17 changes: 0 additions & 17 deletions dev/release/post-12-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -349,23 +349,6 @@ def test_version_post_tag
]
end

Dir.glob("java/**/pom.xml") do |path|
version = "<version>#{@snapshot_version}</version>"
lines = File.readlines(path, chomp: true)
target_lines = lines.grep(/#{Regexp.escape(version)}/)
hunks = []
target_lines.each do |line|
new_line = line.gsub(@snapshot_version) do
@next_snapshot_version
end
hunks << [
"-#{line}",
"+#{new_line}",
]
end
expected_changes << {hunks: hunks, path: path}
end

Dir.glob("ruby/**/version.rb") do |path|
version = " VERSION = \"#{@snapshot_version}\""
new_version = " VERSION = \"#{@next_snapshot_version}\""
Expand Down
4 changes: 0 additions & 4 deletions dev/release/setup-rhel-rebuilds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ dnf -y install \
cmake \
git \
gobject-introspection-devel \
java-11-openjdk-devel \
libcurl-devel \
llvm-devel \
llvm-toolset \
maven \
ncurses-devel \
ninja-build \
nodejs \
Expand All @@ -55,5 +53,3 @@ npm install -g yarn

python3 -m ensurepip --upgrade
alternatives --set python /usr/bin/python3
alternatives --set java java-11-openjdk.$(uname -i)
alternatives --set javac java-11-openjdk.$(uname -i)
2 changes: 0 additions & 2 deletions dev/release/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ apt-get install -y -q --no-install-recommends \
libglib2.0-dev \
libsqlite3-dev \
libssl-dev \
maven \
ninja-build \
nlohmann-json${nlohmann_json}-dev \
openjdk-11-jdk \
pkg-config \
python${python}-dev \
python${python}-venv \
Expand Down
11 changes: 0 additions & 11 deletions dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,6 @@ update_versions() {
git add vcpkg.json
popd

pushd "${ARROW_DIR}/java"
mvn versions:set -DnewVersion=${version} -DprocessAllModules -DgenerateBackupPoms=false
if [ "${type}" = "release" ]; then
# versions-maven-plugin:set-scm-tag does not update the whole reactor. Invoking separately
mvn versions:set-scm-tag -DnewTag=apache-arrow-${version} -DgenerateBackupPoms=false -pl :arrow-java-root
mvn versions:set-scm-tag -DnewTag=apache-arrow-${version} -DgenerateBackupPoms=false -pl :arrow-bom
fi
git add "pom.xml"
git add "**/pom.xml"
popd

pushd "${ARROW_DIR}/csharp"
sed -i.bak -E -e \
"s/^ <Version>.+<\/Version>/ <Version>${version}<\/Version>/" \
Expand Down
Loading

0 comments on commit fb8e812

Please sign in to comment.