Skip to content

release: improve release.sh script - #447

Merged
zeroshade merged 3 commits into
apache:mainfrom
zeroshade:update-release
Jun 5, 2025
Merged

zeroshade merged 3 commits into
apache:mainfrom
zeroshade:update-release

Conversation

@zeroshade

Copy link
Copy Markdown
Member

Improving the release.sh script to do things properly:

  • Rename the "-rc#" artifacts to remove the "-rc#" portion from the pre-release
  • Create the proper release automatically using the same commit pointed to by the rc
  • Properly sign the release tar with the updated name

@github-actions github-actions Bot added the INFRA label May 29, 2025
@zeroshade
zeroshade requested review from Fokko and kevinjqliu May 29, 2025 15:58

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The previous method moves the rc artifacts from apache dist/dev/ to dist/release/ as is. I think its cleaner and less error prone. Can we keep this part?

I still like the addition of pushing a new github release

Comment thread dev/release/release.sh
rc_tag="${tag}-rc${rc}"
echo "Tagging for release: ${tag}"
git tag "${tag}" "${rc_tag}"
git tag "${tag}" "${rc_tag}^{}" -m "Release ${tag}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 "${rc_tag}^{}" means return the commit for this tag

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yup!

Comment thread dev/release/release.sh Outdated
Comment on lines +54 to +56
gh release download "${rc_tag}" \
--dir "${dist_dir}" \
--skip-existing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit, i think we should download from apache instead, using dist_dev_url

@zeroshade

Copy link
Copy Markdown
Member Author

The previous method moves the rc artifacts from apache dist/dev/ to dist/release/ as is. I think its cleaner and less error prone. Can we keep this part?

The thing I don't like about that is that it doesn't rename the files to remove the -rc# portion of the filenames. I could try to manipulate the svn command so that it can move and rename instead of downloading the artifacts from the pre-release on github, but it's difficult to test it out since I don't actually have permission to run the svn commands....

@kevinjqliu

Copy link
Copy Markdown
Contributor

okay i see what youre trying to do now..

instead of going through the hoops of renaming the files, could we just name the folder with the rc but not the files?

apache-iceberg-go-0.2.0-rc0/    
    apache-iceberg-go-0.2.0.tar.gz
    apache-iceberg-go-0.2.0.tar.gz.asc
    apache-iceberg-go-0.2.0.tar.gz.sha512

This way we can use the svn mv command.

This is what the python and rust releases do
https://dist.apache.org/repos/dist/dev/iceberg/apache-iceberg-rust-0.5.1-rc.1/
https://py.iceberg.apache.org/how-to-release/#upload-artifacts-to-apache-dev-svn

@zeroshade

Copy link
Copy Markdown
Member Author

Ah, okay I'll try that. I'll have to change the release_rc.sh scripts to rename the files and remove the -rc before uploading them to svn.

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

Comment thread dev/release/release_rc.sh Outdated
Comment on lines +106 to +109
gh release upload "${rc_tag}" \
--clobber \
--repo "${repository}" \
"${tar_gz}".asc "${tar_gz}.sha512"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

btw, the gh release already generates the sha512 file.

gh release download v0.3.0-rc0 --repo apache/iceberg-go

downloads

  • apache-iceberg-go-0.3.0-rc0.tar.gz
  • apache-iceberg-go-0.3.0-rc0.tar.gz.sha512

@zeroshade
zeroshade merged commit 40ee887 into apache:main Jun 5, 2025
@zeroshade
zeroshade deleted the update-release branch June 5, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants