From fea9b232ad5b2c6630d6f41cc5958a27310422d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Avard=20Ottestad?= Date: Fri, 2 Aug 2024 13:29:17 +0200 Subject: [PATCH] improve release script to delay calling jenkins until we know that the build went through correctly, also improve the automation by reducing the number of times you need to press any key to continue --- scripts/release.sh | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index e3af5ac451..311d4d7d33 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -167,7 +167,6 @@ mvn versions:set -DnewVersion="${MVN_VERSION_RELEASE}" mvn versions:commit - # delete old release branch if it exits if git show-ref --verify --quiet "refs/heads/${BRANCH}"; then git branch --delete --force "${BRANCH}" &>/dev/null @@ -180,20 +179,11 @@ git tag "${MVN_VERSION_RELEASE}" echo ""; echo "Pushing release branch to github" -read -n 1 -srp "Press any key to continue (ctrl+c to cancel)"; printf "\n\n"; # push release branch and tag git push -u origin "${BRANCH}" git push origin "${MVN_VERSION_RELEASE}" -echo ""; -echo "You need to tell Jenkins to start the release deployment processes, for SDK and maven artifacts" -echo "- SDK deployment: https://ci.eclipse.org/rdf4j/job/rdf4j-deploy-release-sdk/ " -echo "- Maven deployment: https://ci.eclipse.org/rdf4j/job/rdf4j-deploy-release-ossrh/ " -echo "(if you are on linux or windows, remember to use CTRL+SHIFT+C to copy)." -echo "Log in, then choose 'Build with Parameters' and type in ${MVN_VERSION_RELEASE}" -read -n 1 -srp "Press any key to continue (ctrl+c to cancel)"; printf "\n\n"; - # Cleanup mvn clean -Dmaven.clean.failOnError=false mvn clean -Dmaven.clean.failOnError=false @@ -219,15 +209,13 @@ git push echo ""; echo "About to create PR" -read -n 1 -srp "Press any key to continue (ctrl+c to cancel)"; printf "\n\n"; echo ""; echo "Creating pull request to merge release branch back into main" -gh pr create --title "next development iteration: ${MVN_NEXT_SNAPSHOT_VERSION}" --body "Merge using merge commit rather than rebase" +gh pr create -B main --title "next development iteration: ${MVN_NEXT_SNAPSHOT_VERSION}" --body "Merge using merge commit rather than rebase" echo ""; echo "Preparing a merge-branch to merge into develop" -read -n 1 -srp "Press any key to continue (ctrl+c to cancel)"; printf "\n\n"; @@ -255,7 +243,6 @@ mvn clean -Dmaven.clean.failOnError=false mvn clean -Dmaven.clean.failOnError=false echo "Build javadocs" -read -n 1 -srp "Press any key to continue (ctrl+c to cancel)"; printf "\n\n"; git checkout "${MVN_VERSION_RELEASE}" @@ -289,7 +276,13 @@ cd scripts echo "" echo "DONE!" - +echo ""; +echo "You need to tell Jenkins to start the release deployment processes, for SDK and maven artifacts" +echo "- SDK deployment: https://ci.eclipse.org/rdf4j/job/rdf4j-deploy-release-sdk/ " +echo "- Maven deployment: https://ci.eclipse.org/rdf4j/job/rdf4j-deploy-release-ossrh/ " +echo "(if you are on linux or windows, remember to use CTRL+SHIFT+C to copy)." +echo "Log in, then choose 'Build with Parameters' and type in ${MVN_VERSION_RELEASE}" +read -n 1 -srp "Press any key to continue (ctrl+c to cancel)"; printf "\n\n"; echo "" echo "You will now want to inform the community about the new release!"