This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new d3eee6ac8f [#7073] improvement(build): Optimize the release script 
(#7075)
d3eee6ac8f is described below

commit d3eee6ac8f86988cc728fe7b288d6d8bed0bc060
Author: roryqi <[email protected]>
AuthorDate: Fri Apr 25 17:25:37 2025 +0800

    [#7073] improvement(build): Optimize the release script (#7075)
    
    ### What changes were proposed in this pull request?
    
    Optimize the release script
    
    ### Why are the changes needed?
    
    Fix: #7073
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    By hand.
---
 dev/release/do-release.sh    | 7 +++++++
 dev/release/release-build.sh | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/dev/release/do-release.sh b/dev/release/do-release.sh
index cc2825a8b3..55ec5dada7 100755
--- a/dev/release/do-release.sh
+++ b/dev/release/do-release.sh
@@ -48,6 +48,13 @@ fi
 
 . "$SELF/release-util.sh"
 
+if ! is_dry_run; then
+  if [[ -z "$PYPI_API_TOKEN" ]]; then
+    echo 'The environment variable PYPI_API_TOKEN is not set. Exiting.'
+    exit 1
+  fi
+fi
+
 if [ "$RUNNING_IN_DOCKER" = "1" ]; then
   # Inside docker, need to import the GPG key stored in the current directory.
   echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --import "$SELF/gpg.key"
diff --git a/dev/release/release-build.sh b/dev/release/release-build.sh
index 3e4ab9515c..4f5a8ec875 100755
--- a/dev/release/release-build.sh
+++ b/dev/release/release-build.sh
@@ -177,6 +177,10 @@ fi
 if [[ "$PYGRAVITINO_VERSION" == *"dev"* ]]; then
   RC_PYGRAVITINO_VERSION="${PYGRAVITINO_VERSION}"
 else
+  if [ -z "$RC_COUNT" ]; then
+    echo "ERROR: RC_COUNT must be set to run this script"
+    exit_with_usage
+  fi
   RC_PYGRAVITINO_VERSION="${PYGRAVITINO_VERSION}rc${RC_COUNT}"
 fi
 

Reply via email to