From 72e5e57a6c04ee222a666a877622e6f983d18ff6 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Fri, 10 Jun 2022 08:58:24 -0300 Subject: [PATCH] chore: Updates the final steps of the release README (#20318) * chore: Updates the final steps of the release README * Apply suggestions from code review Co-authored-by: Yongjie Zhao Co-authored-by: Yongjie Zhao --- RELEASING/README.md | 40 +++++++++++++++++++++++++++++++++++++--- scripts/pypi_push.sh | 33 --------------------------------- 2 files changed, 37 insertions(+), 36 deletions(-) delete mode 100755 scripts/pypi_push.sh diff --git a/RELEASING/README.md b/RELEASING/README.md index 470c890ba9..1d3285e0ff 100644 --- a/RELEASING/README.md +++ b/RELEASING/README.md @@ -422,13 +422,47 @@ with the changes on `CHANGELOG.md` and `UPDATING.md`. ### Publishing a Convenience Release to PyPI -Using the final release tarball, unpack it and run `./pypi_push.sh`. -This script will build the JavaScript bundle and echo the twine command -allowing you to publish to PyPI. You may need to ask a fellow committer to grant +Extract the release to the `/tmp` folder to build the PiPY release. Files in the `/tmp` folder will be automatically deleted by the OS. + +```bash +mkdir -p /tmp/superset && cd /tmp/superset +tar xfvz ~/svn/superset/${SUPERSET_VERSION}/${SUPERSET_RELEASE_TARBALL} +``` + +Create a virtual environment and install the dependencies + +```bash +cd ${SUPERSET_RELEASE_RC} +python3 -m venv venv +source venv/bin/activate +pip install -r requirements/base.txt +pip install twine +``` + +Create the distribution + +```bash +cd superset-frontend/ +npm ci && npm run build +cd ../ +flask fab babel-compile --target superset/translations +python setup.py sdist +``` + +Publish to PyPI + +You may need to ask a fellow committer to grant you access to it if you don't have access already. Make sure to create an account first if you don't have one, and reference your username while requesting access to push packages. +```bash +twine upload dist/apache-superset-${SUPERSET_VERSION}.tar.gz + +# Set your username to token +# Set your password to the token value, including the pypi- prefix +``` + ### Announcing Once it's all done, an [ANNOUNCE] thread announcing the release to the dev@ mailing list is the final step. diff --git a/scripts/pypi_push.sh b/scripts/pypi_push.sh deleted file mode 100755 index 881d823fa8..0000000000 --- a/scripts/pypi_push.sh +++ /dev/null @@ -1,33 +0,0 @@ -# -# 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. -# -# Make sure you've followed the instructions on `RELEASING/README.md` -# and are on the correct branch -cd ${SUPERSET_REPO_DIR} -git branch -rm superset/static/assets/* -cd superset-frontend/ -npm ci && npm run build -cd ../ -echo "----------------------" -echo "Compiling translations" -echo "----------------------" -flask fab babel-compile --target superset/translations -echo "----------------------" -echo "Creating distribution " -echo "----------------------" -python setup.py sdist -echo "RUN: twine upload dist/apache-superset-${SUPERSET_VERSION}.tar.gz"