[
https://issues.apache.org/jira/browse/BEAM-10106?focusedWorklogId=437916&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-437916
]
ASF GitHub Bot logged work on BEAM-10106:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 27/May/20 17:09
Start Date: 27/May/20 17:09
Worklog Time Spent: 10m
Work Description: tvalentyn commented on a change in pull request #11828:
URL: https://github.com/apache/beam/pull/11828#discussion_r431285733
##########
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]"
Review comment:
How about also print the path that will be cleaned up?
##########
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}
Review comment:
Let's add a message here that the folder was found, and so it's being
deleted.
##########
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."
Review comment:
Nit: Cleaned up local repo.
##########
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
Review comment:
Can we do this in a virtual environment? On my machine this would fail
with:
```
Could not install packages due to an EnvironmentError: [Errno 13] Permission
denied: '/usr/local/lib/python2.7/dist-packages/requests_toolbelt'
Consider using the `--user` option or check the permissions.
```
##########
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:
Assuming this a verbose command. If not please add some messages to
guide the user what is happening.
##########
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."
Review comment:
nit: s/Exit/Exiting
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 437916)
Time Spent: 20m (was: 10m)
> Script the deployment of artifacts to pypi
> ------------------------------------------
>
> Key: BEAM-10106
> URL: https://issues.apache.org/jira/browse/BEAM-10106
> Project: Beam
> Issue Type: Improvement
> Components: build-system
> Reporter: Kyle Weaver
> Assignee: Kyle Weaver
> Priority: P2
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Right now there's only manual instructions, which are tedious and
> error-prone.
> https://beam.apache.org/contribute/release-guide/#8-finalize-the-release
--
This message was sent by Atlassian Jira
(v8.3.4#803005)