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 2020/05/27 17:15:55 UTC

[GitHub] [beam] ibzib commented on a change in pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

ibzib commented on a change in pull request #11828:
URL: https://github.com/apache/beam/pull/11828#discussion_r431309830



##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}
+fi
+mkdir ${LOCAL_CLONE_DIR}
+cd ${LOCAL_CLONE_DIR}
+
+wget -r --no-parent -A zip,whl "https://dist.apache.org/repos/dist/dev/beam/${RELEASE}/python"
+cd "dist.apache.org/repos/dist/dev/beam/${RELEASE}/python/"
+pip install twine
+echo "Will upload the following files to PyPI:"
+ls
+echo "Are the files listed correct? [y|N]"
+read confirmation
+if [[ $confirmation != "y" ]]; then
+  echo "Exit without deploying artifacts to PyPI."
+  clean_up
+  exit
+fi
+twine upload *

Review comment:
       It is. Example output:
   
   ```
   Uploading distributions to https://upload.pypi.org/legacy/
   Uploading apache_beam-2.21.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.62M/4.62M [00:02<00:00, 1.66MB/s]
   Uploading apache_beam-2.21.0-cp27-cp27m-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.01M/3.01M [00:02<00:00, 1.38MB/s]
   Uploading apache_beam-2.21.0-cp27-cp27m-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.29M/3.29M [00:02<00:00, 1.36MB/s]
   Uploading apache_beam-2.21.0-cp27-cp27mu-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.01M/3.01M [00:02<00:00, 1.35MB/s]
   Uploading apache_beam-2.21.0-cp27-cp27mu-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.29M/3.29M [00:02<00:00, 1.55MB/s]
   Uploading apache_beam-2.21.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.64M/4.64M [00:02<00:00, 1.97MB/s]
   Uploading apache_beam-2.21.0-cp35-cp35m-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.04M/3.04M [00:02<00:00, 1.15MB/s]
   Uploading apache_beam-2.21.0-cp35-cp35m-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.31M/3.31M [00:02<00:00, 1.40MB/s]
   Uploading apache_beam-2.21.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.86M/4.86M [00:02<00:00, 2.11MB/s]
   Uploading apache_beam-2.21.0-cp36-cp36m-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.09M/3.09M [00:02<00:00, 1.31MB/s]
   Uploading apache_beam-2.21.0-cp36-cp36m-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.36M/3.36M [00:02<00:00, 1.54MB/s]
   Uploading apache_beam-2.21.0-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.76M/4.76M [00:02<00:00, 1.82MB/s]
   Uploading apache_beam-2.21.0-cp37-cp37m-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.09M/3.09M [00:02<00:00, 1.44MB/s]
   Uploading apache_beam-2.21.0-cp37-cp37m-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.36M/3.36M [00:02<00:00, 1.61MB/s]
   Uploading apache-beam-2.21.0.zip
   100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.95M/1.95M [00:02<00:00, 870kB/s]
   
   View at:
   https://pypi.org/project/apache-beam/2.21.0/
   ```




----------------------------------------------------------------
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