From 84aa5ac4a7795986a1f0a6031ad890c74d0b5960 Mon Sep 17 00:00:00 2001 From: Shunping Huang Date: Thu, 10 Oct 2024 17:06:58 -0400 Subject: [PATCH] Fix the snapshot publishing script (#32744) * Fix the snapshot publishing script * Support distribution from setuptools prior to 69.3.0 as well. --- sdks/python/scripts/run_snapshot_publish.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdks/python/scripts/run_snapshot_publish.sh b/sdks/python/scripts/run_snapshot_publish.sh index bc379077349d5..0d7c7764748df 100755 --- a/sdks/python/scripts/run_snapshot_publish.sh +++ b/sdks/python/scripts/run_snapshot_publish.sh @@ -31,7 +31,9 @@ DEP_SNAPSHOT_FILE_NAME="beam-py-requirements-$time.txt" cd $WORKSPACE/sdks/python/build # Rename the file to be apache-beam-{VERSION}-{datetime}.tar.gz -for file in "apache-beam-$VERSION*.tar.gz"; do +# Notice that the distribution name of beam can be "apache-beam" with +# setuptools<69.3.0 or "apache_beam" with setuptools>=69.3.0. +for file in "apache[-_]beam-$VERSION*.tar.gz"; do mv $file $SNAPSHOT done