TobKed commented on a change in pull request #12150:
URL: https://github.com/apache/beam/pull/12150#discussion_r457920539
##########
File path: release/src/main/scripts/build_release_candidate.sh
##########
@@ -154,41 +155,67 @@ if [[ $confirmation = "y" ]]; then
rm -rf ~/${LOCAL_JAVA_STAGING_DIR}
fi
-echo "[Current Step]: Stage python binaries"
+
+echo "[Current Step]: Stage python binaries and wheels"
+echo "===============================Pre-requirements========================"
+echo "Please make sure you have configured and started your gpg by running
./preparation_before_release.sh."
echo "Do you want to proceed? [y|N]"
read confirmation
if [[ $confirmation = "y" ]]; then
echo "============Staging Python Binaries on dist.apache.org========="
cd ~
- if [[ -d ${LOCAL_PYTHON_STAGING_DIR} ]]; then
- rm -rf ${LOCAL_PYTHON_STAGING_DIR}
+ if [[ -d "${LOCAL_PYTHON_STAGING_DIR}" ]]; then
+ rm -rf "${LOCAL_PYTHON_STAGING_DIR}"
fi
- mkdir -p ${LOCAL_PYTHON_STAGING_DIR}
- cd ${LOCAL_PYTHON_STAGING_DIR}
+ mkdir -p "${LOCAL_PYTHON_STAGING_DIR}"
+ cd "${LOCAL_PYTHON_STAGING_DIR}"
echo '-------------------Cloning Beam Release Branch-----------------'
- git clone ${GIT_REPO_URL}
- cd ${BEAM_ROOT_DIR}
- git checkout ${RELEASE_BRANCH}
+ git clone "${GIT_REPO_URL}"
+ cd "${BEAM_ROOT_DIR}"
+ git checkout "${RELEASE_BRANCH}"
+ git push origin "${RELEASE_BRANCH}"
+ RELEASE_COMMIT=$(git rev-parse --verify HEAD)
- echo '-------------------Generating Python Artifacts-----------------'
- cd sdks/python
- virtualenv ${LOCAL_PYTHON_VIRTUALENV}
- source ${LOCAL_PYTHON_VIRTUALENV}/bin/activate
- pip install -r build-requirements.txt
- python setup.py sdist --format=zip
- cd dist
+ echo '-------------------Creating Python Virtualenv-----------------'
+ python3 -m venv "${LOCAL_PYTHON_VIRTUALENV}"
+ source "${LOCAL_PYTHON_VIRTUALENV}/bin/activate"
+ pip install requests python-dateutil
+
+ echo '--------------Fetching GitHub Actions Artifacts--------------'
+ python release/src/main/scripts/download_github_actions_artifacts.py \
+ --github-user "${USER_GITHUB_ID}" \
+ --repo-url "${GIT_REPO_BASE_URL}" \
+ --release-branch "${RELEASE_BRANCH}" \
+ --release-commit "${RELEASE_COMMIT}" \
+ --artifacts_dir "${PYTHON_ARTIFACTS_DIR}"
svn co https://dist.apache.org/repos/dist/dev/beam
- mkdir -p beam/${RELEASE}/${PYTHON_ARTIFACTS_DIR}
- cp apache-beam-${RELEASE}.zip
beam/${RELEASE}/${PYTHON_ARTIFACTS_DIR}/apache-beam-${RELEASE}.zip
- cd beam/${RELEASE}/${PYTHON_ARTIFACTS_DIR}
+ mkdir -p "beam/${RELEASE}/${PYTHON_ARTIFACTS_DIR}"
+ cp -ar "${PYTHON_ARTIFACTS_DIR}/" "beam/${RELEASE}/${PYTHON_ARTIFACTS_DIR}/"
+ cd "beam/${RELEASE}/${PYTHON_ARTIFACTS_DIR}"
+
+ echo "------Checking Hash Value for apache-beam-${RELEASE}.zip-----"
+ sha512sum -c "apache-beam-${RELEASE}.zip.sha512"
echo "------Signing Source Release apache-beam-${RELEASE}.zip------"
- gpg --local-user ${SIGNING_KEY} --armor --detach-sig
apache-beam-${RELEASE}.zip
+ gpg --local-user "${SIGNING_KEY}" --armor --detach-sig
"apache-beam-${RELEASE}.zip"
- echo "------Creating Hash Value for apache-beam-${RELEASE}.zip------"
- sha512sum apache-beam-${RELEASE}.zip > apache-beam-${RELEASE}.zip.sha512
+ echo "-----Checking Hash Value for apache-beam-${RELEASE}.tar.gz----"
+ sha512sum -c "apache-beam-${RELEASE}.tar.gz.sha512"
+
+ echo "-----Signing Source Release apache-beam-${RELEASE}.tar.gz-----"
+ gpg --local-user "${SIGNING_KEY}" --armor --detach-sig
"apache-beam-${RELEASE}.tar.gz"
+
+ echo "-----Checking Hash Value for apache-beam-${RELEASE} wheels-----"
Review comment:
Sure 👍
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]