Skip to content

Commit

Permalink
Build source release zip from RC tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kennknowles committed Apr 20, 2021
1 parent ff1e3e8 commit b42d8c5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions release/src/main/scripts/build_release_candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,27 @@ if [[ $confirmation = "y" ]]; then
cd beam/${RELEASE}

echo "----------------Downloading Source Release-------------------"
# GitHub strips the "v" from "v2.29.0" in naming zip and the dir inside it
RC_DIR="beam-${RELEASE}-RC${RC_NUM}"
RC_ZIP="${RC_DIR}.zip"
# We want to strip the -RC1 suffix from the directory name inside the zip
RELEASE_DIR="beam-${RELEASE}"

SOURCE_RELEASE_ZIP="apache-beam-${RELEASE}-source-release.zip"
# Check whether there is an existing dist dir
if (svn ls "${SOURCE_RELEASE_ZIP}"); then
echo "Removing existing ${SOURCE_RELEASE_ZIP}."
svn delete "${SOURCE_RELEASE_ZIP}"
fi

echo "Downloading: ${GIT_BEAM_ARCHIVE}/release-${RELEASE}.zip"
wget ${GIT_BEAM_ARCHIVE}/release-${RELEASE}.zip -O "${SOURCE_RELEASE_ZIP}"
echo "Downloading: ${GIT_BEAM_ARCHIVE}/${RC_TAG}.zip"
wget ${GIT_BEAM_ARCHIVE}/${RC_TAG}.zip -O "${RC_ZIP}"

unzip "$RC_ZIP"
rm "$RC_ZIP"
mv "$RC_DIR" "$RELEASE_DIR"
zip -r "${SOURCE_RELEASE_ZIP}" "$RELEASE_DIR"
rm -r "$RELEASE_DIR"

echo "----Signing Source Release ${SOURCE_RELEASE_ZIP}-----"
gpg --local-user ${SIGNING_KEY} --armor --detach-sig "${SOURCE_RELEASE_ZIP}"
Expand Down

0 comments on commit b42d8c5

Please sign in to comment.