@@ -39,7 +39,6 @@ RC_NAME=${RC_NAME:-rc2}
3939M2_REPO=~ /.m2/repository
4040SPARK_REPO=$M2_REPO /org/apache/spark
4141NEXUS_ROOT=https://repository.apache.org/service/local/staging
42- NEXUS_UPLOAD=$NEXUS_ROOT /deploy/maven2
4342NEXUS_PROFILE=d63f592e7eac0 # Profile for Spark staging uploads
4443
4544if [ -z " $JAVA_HOME " ]; then
@@ -64,19 +63,28 @@ if [[ ! "$@" =~ --package-only ]]; then
6463 # NOTE: This is done "eagerly" i.e. we don't check if we can succesfully build
6564 # or before we coin the release commit. This helps avoid races where
6665 # other people add commits to this branch while we are in the middle of building.
67- old=" <version>${RELEASE_VERSION} -SNAPSHOT<\/version>"
68- new=" <version>${RELEASE_VERSION} <\/version>"
69- find . -name pom.xml -o -name package.scala | grep -v dev | xargs -I {} sed -i \
70- -e " s/$old /$new /" {}
66+ cur_ver=" ${RELEASE_VERSION} -SNAPSHOT"
67+ rel_ver=" ${RELEASE_VERSION} "
68+ next_ver=" ${NEXT_VERSION} -SNAPSHOT"
69+
70+ old=" ^\( \{2,4\}\)<version>${cur_ver} <\/version>$"
71+ new=" \1<version>${rel_ver} <\/version>"
72+ find . -name pom.xml | grep -v dev | xargs -I {} sed -i \
73+ -e " s/${old} /${new} /" {}
74+ find . -name package.scala | grep -v dev | xargs -I {} sed -i \
75+ -e " s/${old} /${new} /" {}
76+
7177 git commit -a -m " Preparing Spark release $GIT_TAG "
7278 echo " Creating tag $GIT_TAG at the head of $GIT_BRANCH "
7379 git tag $GIT_TAG
7480
75- old=" <version>${RELEASE_VERSION } <\/version>"
76- new=" <version>${NEXT_VERSION} -SNAPSHOT <\/version>"
77- find . -name pom.xml -o -name package.scala | grep -v dev | xargs -I {} sed -i \
81+ old=" ^\( \{2,4\}\) <version>${rel_ver } <\/version>$ "
82+ new=" \1 <version>${next_ver} <\/version>"
83+ find . -name pom.xml | grep -v dev | xargs -I {} sed -i \
7884 -e " s/$old /$new /" {}
79- git commit -a -m " Preparing development version ${NEXT_VERSION} -SNAPSHOT"
85+ find . -name package.scala | grep -v dev | xargs -I {} sed -i \
86+ -e " s/${old} /${new} /" {}
87+ git commit -a -m " Preparing development version $next_ver "
8088 git push origin $GIT_TAG
8189 git push origin HEAD:$GIT_BRANCH
8290 git checkout -f $GIT_TAG
@@ -118,12 +126,13 @@ if [[ ! "$@" =~ --package-only ]]; then
118126 gpg --print-md SHA1 $file > $file .sha1
119127 done
120128
121- echo " Uplading files to $NEXUS_UPLOAD "
129+ nexus_upload=$NEXUS_ROOT /deployByRepositoryId/$staged_repo_id
130+ echo " Uplading files to $nexus_upload "
122131 for file in $( find . -type f)
123132 do
124133 # strip leading ./
125134 file_short=$( echo $file | sed -e " s/\.\///" )
126- dest_url=" $NEXUS_UPLOAD /org/apache/spark/$file_short "
135+ dest_url=" $nexus_upload /org/apache/spark/$file_short "
127136 echo " Uploading $file_short "
128137 curl -u $ASF_USERNAME :$ASF_PASSWORD --upload-file $file_short $dest_url
129138 done
0 commit comments