@@ -91,7 +91,7 @@ mvnFun() {
9191 MAVEN_OPTS=" ${mvnopts} " ${MVN} -Dmaven.repo.local=" ${repodir} " " $@ "
9292}
9393
94- prepare-src () {
94+ 1- prepare-src () {
9595 cd " $projectdir "
9696 git reset --hard
9797 git clean -fdx
@@ -109,7 +109,7 @@ prepare-src() {
109109 mvnFun clean install -DskipTests=true -Prelease -Papache-release -Dgpg.keyname=" ${CODESIGNINGKEY} "
110110}
111111
112- prepare -bin () {
112+ 2-verify -bin () {
113113 echo " Cleaning up workingdir $WORKINGDIR "
114114 rm -rf " $WORKINGDIR "
115115 mkdir -p " $WORKINGDIR "
@@ -121,7 +121,12 @@ prepare-bin() {
121121 mvnFun clean verify -DskipTests=true -Prelease -Papache-release -Dgpg.keyname=" ${CODESIGNINGKEY} "
122122}
123123
124- assembly () {
124+ 3-publish-mvn () {
125+ cd " $projectdir "
126+ mvnFun verify artifact:compare deploy:deploy -DdeployAtEnd=true -DskipTests=true -Prelease -Papache-release -Dgpg.keyname=" ${CODESIGNINGKEY} " " $@ "
127+ }
128+
129+ 4-assembly () {
125130 cd " $SVNDISTDIR "
126131 RCDIR=" $SVNDISTDIR /${RATISVERSION} /${RC# -} "
127132 mkdir -p " $RCDIR "
@@ -135,40 +140,35 @@ assembly() {
135140 svn add " ${RATISVERSION} " || svn add " ${RATISVERSION} /${RC# -} "
136141}
137142
138- publish-git (){
143+ 5- publish-git (){
139144 cd " $projectdir "
140145 git push apache " ratis-${RATISVERSION}${RC} "
141146}
142147
143- publish-svn () {
148+ 6- publish-svn () {
144149 cd " ${SVNDISTDIR} "
145150 svn commit -m " Publish proposed version of the next Ratis release ${RATISVERSION}${RC} "
146151}
147152
148- publish-mvn (){
149- cd " $projectdir "
150- mvnFun deploy:deploy
151- }
152-
153- if [ " $# " -ne 1 ]; then
153+ if [ " $# " -lt 1 ]; then
154154 cat << EOF
155155
156- Please choose from available phases (eg. make_rc.sh prepare-src):
156+ Please choose from available phases (eg. make_rc.sh 1- prepare-src):
157157
158- 1. prepare-src: This is the first step. It modifies the mvn version, creates the git tag and
158+ 1- prepare-src: This is the first step. It modifies the mvn version, creates the git tag and
159159 builds the project to create the source artifacts.
160160 IT INCLUDES A GIT RESET + CLEAN. ALL THE LOCAL CHANGES WILL BE LOST!
161161
162- 2. prepare- bin: The source artifact is copied to the $WORKINGDIR and the binary artifact is created from the source.
162+ 2-verify- bin: The source artifact is copied to the $WORKINGDIR and the binary artifact is created from the source.
163163 This is an additional check as the the released source artifact should be enough to build the whole project.
164164
165- 3. assembly : This step copies all the required artifacts to the svn directory and ( $SVNDISTDIR ) creates the signatures/checksum files.
165+ 3-publish-mvn : Performs the final build, and uploads the artifacts to the maven staging repository
166166
167- 4. publish-git: The first remote step, only do it if everything is fine. It pushes the rc tag to the repository .
167+ 4-assembly: This step copies all the required artifacts to the svn directory and ( $SVNDISTDIR ) creates the signatures/checksum files .
168168
169- 5. publish-svn: Uploads the artifacts to the apache dev staging area to start the vote .
169+ 5- publish-git: Only do it if everything is fine. It pushes the rc tag to the repository .
170170
171- 6. publish-mvn: Uploads the artifacts to the maven staging repository
171+ 6- publish-svn: Uploads the artifacts to the apache dev staging area to start the vote.
172172
173173The next steps of the release process are not scripted:
174174
@@ -189,5 +189,7 @@ The next steps of the release process are not scripted:
189189EOF
190190else
191191 set -x
192- eval " $1 "
192+ func=" $1 "
193+ shift
194+ eval " $func " " $@ "
193195fi
0 commit comments