diff --git a/createRelease.sh b/createRelease.sh index bc271b9be..83badb545 100755 --- a/createRelease.sh +++ b/createRelease.sh @@ -13,7 +13,7 @@ then exit fi -VERSION=$(grep "" pom.xml | head -1 | sed "s/.*\([0-9.]*\)-SNAPSHOT<\/version>.*/\1/") +VERSION=$(grep "" pom.xml | head -1 | sed "s/.*\([0-9.]*\)\(-SNAPSHOT\)\{0,1\}<\/version>.*/\1/") NEW_VERSION=${1}-SNAPSHOT cat << EOD @@ -28,40 +28,44 @@ Press ENTER to continue. Ctrl-C to stop. EOD read ignored -echo "1. Setting release version: ${VERSION}" -mvn versions:set -DnewVersion="${VERSION}" +# echo "#1. Setting release version: ${VERSION}" +# mvn versions:set -DnewVersion="${VERSION}" -echo "2. Test build" +echo "#2. Test build" mvn clean install -[ $? -eq 0 ] || echo "Errors. Exiting." && exit +RC=$? +if [ ${RC} -ne 0 ] +then + echo "Errors. Exiting." + exit +fi -echo "3. Commit changes and tag" +echo "#3. Commit changes and tag" git commit -a -m "Set version to ${VERSION}" && git tag "${VERSION}" -echo "4. Make a staging release" +echo "#4. Make a staging release" mvn clean deploy RC=$? - if [ $RC -eq 0 ] then cat << EOD Staging Release seems to be created. Please review it at https://oss.sonatype.org/#stagingRepositories if everything seems fine, hit ENTER. Else break this script with Ctrl-C. EOD + read pause else echo "Something went wrong. Please switch to manual deploy." echo "(look at https://github.com/LibrePDF/OpenPDF/wiki/Release-Process)" exit fi -echo "5. Deploy release." +echo "#5. Deploy release." mvn nexus-staging:release -echo "6. Finishing." +echo "#6. Finishing." echo " - set next SNAPSHOT to $NEW_VERSION" mvn versions:set -DnewVersion="$NEW_VERSION" echo " - commit changes" git commit -a -m "Set new Snapshot to $NEW_VERSION" echo " - push all to github" git push "${LIBREPDF_ORIGIN}" --tags - diff --git a/openpdf-fonts-extra/pom.xml b/openpdf-fonts-extra/pom.xml index 503ebd912..3d18ae7d3 100644 --- a/openpdf-fonts-extra/pom.xml +++ b/openpdf-fonts-extra/pom.xml @@ -5,7 +5,7 @@ com.github.librepdf openpdf-parent - 1.3.27-SNAPSHOT + 1.3.27 openpdf-fonts-extra diff --git a/openpdf/pom.xml b/openpdf/pom.xml index 8489dc0bc..c859968a4 100644 --- a/openpdf/pom.xml +++ b/openpdf/pom.xml @@ -5,7 +5,7 @@ com.github.librepdf openpdf-parent - 1.3.27-SNAPSHOT + 1.3.27 openpdf diff --git a/pdf-swing/pom.xml b/pdf-swing/pom.xml index d06ea2264..576a60ba9 100644 --- a/pdf-swing/pom.xml +++ b/pdf-swing/pom.xml @@ -5,7 +5,7 @@ com.github.librepdf openpdf-parent - 1.3.27-SNAPSHOT + 1.3.27 pdf-swing diff --git a/pdf-toolbox/pom.xml b/pdf-toolbox/pom.xml index ef301804f..4cc06bf93 100644 --- a/pdf-toolbox/pom.xml +++ b/pdf-toolbox/pom.xml @@ -5,7 +5,7 @@ com.github.librepdf openpdf-parent - 1.3.27-SNAPSHOT + 1.3.27 pdf-toolbox diff --git a/pom.xml b/pom.xml index fcaa7bb1d..610183c2f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.github.librepdf openpdf-parent - 1.3.27-SNAPSHOT + 1.3.27 pom