@@ -116,13 +116,6 @@ if [ -z "$SPARK_PACKAGE_VERSION" ]; then
116116 SPARK_PACKAGE_VERSION=" ${SPARK_VERSION} -$( date +%Y_%m_%d_%H_%M) -${git_hash} "
117117fi
118118
119- # Drop the v from the start of the version string in publish-release mode for nexus.
120- if [[ " $@ " == * " publish-release" * ]]; then
121- # shellcheck disable=SC2001
122- VERSION_WITH_RC=$( echo " $RELEASE_TAG " | sed -e " s/v//" )
123- SPARK_VERSION=$VERSION_WITH_RC
124- fi
125-
126119DEST_DIR_NAME=" spark-$SPARK_PACKAGE_VERSION "
127120
128121function LFTP {
@@ -308,6 +301,11 @@ if [[ "$1" == "docs" ]]; then
308301fi
309302
310303if [[ " $1 " == " publish-snapshot" ]]; then
304+ # Drop the v from the start of the version string for nexus.
305+ # shellcheck disable=SC2001
306+ VERSION_WITH_RC=$( echo " $RELEASE_TAG " | sed -e " s/v//" )
307+ SPARK_VERSION=$VERSION_WITH_RC
308+
311309 cd spark
312310 # Publish Spark to Maven release repo
313311 echo " Deploying Spark SNAPSHOT at '$GIT_REF ' ($git_hash )"
@@ -342,6 +340,11 @@ if [[ "$1" == "publish-snapshot" ]]; then
342340fi
343341
344342if [[ " $1 " == " publish-release" ]]; then
343+ # Drop the v from the start of the version string for nexus.
344+ # shellcheck disable=SC2001
345+ VERSION_WITH_RC=$( echo " $RELEASE_TAG " | sed -e " s/v//" )
346+ SPARK_VERSION=$VERSION_WITH_RC
347+
345348 cd spark
346349 # Publish Spark to Maven release repo
347350 echo " Publishing Spark checkout at '$GIT_REF ' ($git_hash )"
0 commit comments