You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/03/25 23:57:30 UTC

[GitHub] [beam] benWize commented on a change in pull request #14325: [BEAM-9185] Publish pre-release python artifacts (RCs) to PyPI

benWize commented on a change in pull request #14325:
URL: https://github.com/apache/beam/pull/14325#discussion_r601912280



##########
File path: release/src/main/scripts/deploy_release_candidate_pypi.sh
##########
@@ -0,0 +1,181 @@
+#!/bin/bash
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+
+# This script will deploy a Release Candidate to pypi, includes:
+# 1. Download python binary artifacts
+# 2. Deploy Release Candidate to pypi
+
+set -e
+
+function usage() {
+  echo 'Usage: deploy_release_candidate.sh --release <version> --rc <rc> --commit <commit> --user <user> [--deploy]'
+}
+
+RELEASE=
+RC=
+COMMIT=
+USER_GITHUB_ID=
+DEPLOY=no
+PYTHON_ARTIFACTS_DIR=python
+BEAM_ROOT_DIR=beam
+GIT_REPO_BASE_URL=apache/beam
+
+while [[ $# -gt 0 ]] ; do
+  arg="$1"
+
+  case $arg in
+      --release)
+      shift
+      RELEASE=$1
+      shift
+      ;;
+
+      --rc)
+      shift
+      RC=$1
+      shift
+      ;;
+
+      --commit)
+      shift
+      COMMIT=$1
+      shift
+      ;;
+
+      --user)
+      shift
+      USER_GITHUB_ID=$1
+      shift
+      ;;
+
+      --deploy)
+      DEPLOY=yes
+      shift
+      ;;
+
+      *)
+      usage
+      exit 1
+      ;;
+   esac
+done
+
+if [[ -z "$RELEASE" ]] ; then
+  echo 'No release version supplied.'
+  usage
+  exit 1
+fi
+
+if [[ -z "$RC" ]] ; then
+  echo 'No RC number supplied'
+  usage
+  exit 1
+fi
+
+if [[ -z "$COMMIT" ]] ; then
+  echo 'No commit hash supplied.'
+  usage
+  exit 1
+fi
+
+if [[ -z "$USER_GITHUB_ID" ]] ; then
+  echo 'No github user supplied.'
+  usage
+  exit 1
+fi
+
+function clean_up(){
+  echo "Do you want to clean local clone repo ${LOCAL_CLONE_DIR}? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Cleaned up local repo."
+  fi
+}
+
+RC_TAG="v${RELEASE}-RC${RC}"
+LOCAL_CLONE_DIR="beam_release_${RC_TAG}"
+SCRIPT_DIR=$(dirname $0)
+
+echo "================Checking Environment Variables=============="
+echo "working on release version: ${RELEASE}"
+echo "working on release branch: ${RC_TAG}"
+echo "will create release candidate: RC${RC}"

Review comment:
       Yes, it is already created, I will change the message




-- 
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:
users@infra.apache.org