diff --git a/scripts/milestone-release.sh b/scripts/milestone-release.sh index a2975d9603c..395fab12ac9 100755 --- a/scripts/milestone-release.sh +++ b/scripts/milestone-release.sh @@ -54,9 +54,12 @@ if ! command -v xmllint &> /dev/null; then exit 1; fi +echo "Running git pull to make sure we are up to date" +git pull + # check that we are on main or develop -if ! git status --porcelain --branch | grep -q "## main...origin/main"; then - if ! git status --porcelain --branch | grep -q "## develop...origin/develop"; then +if ! [[ $(git status --porcelain -u no --branch) == "## main...origin/main" ]]; then + if ! [[ $(git status --porcelain -u no --branch) == "## develop...origin/develop" ]]; then echo"" echo "You need to be on main or develop!"; echo ""; @@ -65,10 +68,10 @@ if ! git status --porcelain --branch | grep -q "## main...origin/main"; then fi ORIGINAL_BRANCH="" -if git status --porcelain --branch | grep -q "## main...origin/main"; then +if ! [[ $(git status --porcelain -u no --branch) == "## main...origin/main" ]]; then ORIGINAL_BRANCH="main"; fi -if git status --porcelain --branch | grep -q "## develop...origin/develop"; then +if ! [[ $(git status --porcelain -u no --branch) == "## develop...origin/develop" ]]; then ORIGINAL_BRANCH="develop"; fi @@ -76,7 +79,7 @@ echo "Running git pull to make sure we are up to date" git checkout develop git pull -if ! git status --porcelain --branch | grep -q "## develop...origin/develop"; then +if ! [[ $(git status --porcelain -u no --branch) == "## develop...origin/develop" ]]; then echo"" echo "There is something wrong with your git. It seems you are not up to date with develop. Run git status"; echo ""; @@ -86,7 +89,7 @@ fi git checkout main git pull -if ! git status --porcelain --branch | grep -q "## main...origin/main"; then +if ! [[ $(git status --porcelain -u no --branch) == "## main...origin/main" ]]; then echo"" echo "There is something wrong with your git. It seems you are not up to date with main. Run git status"; echo ""; @@ -113,6 +116,8 @@ fi echo "Running maven clean and install -DskipTests"; +mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false mvn clean; mvn install -DskipTests; @@ -172,20 +177,32 @@ 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"; +mvn clean -Dmaven.clean.failOnError=false mvn clean -Dmaven.clean.failOnError=false git checkout develop mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false + git checkout main 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}" mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false + +# temporarily disable exiting on error +set +e mvn clean -mvn compile -Pquick -Dmaven.compiler.failOnError=false +mvn compile -DskipTests +mvn package -Passembly -DskipTests +set -e + mvn package -Passembly -DskipTests git checkout main diff --git a/scripts/release.sh b/scripts/release.sh index aab0163fb98..9f40a4f733e 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -66,8 +66,11 @@ if ! command -v xmllint &> /dev/null; then exit 1; fi +echo "Running git pull to make sure we are up to date" +git pull + # check that we are on main -if ! git status --porcelain --branch | grep -q "## main...origin/main"; then +if ! [[ $(git status --porcelain -u no --branch) == "## main...origin/main" ]]; then echo"" echo "You need to be on main!"; echo "git checkout main"; @@ -75,6 +78,8 @@ if ! git status --porcelain --branch | grep -q "## main...origin/main"; then exit 1; fi +mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false mvn clean; echo "Running git pull to make sure we are up to date" @@ -102,12 +107,17 @@ if ! git push --dry-run > /dev/null 2>&1; then exit 1; fi +mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false mvn clean; git checkout develop; -mvn clean; git pull; +mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false mvn clean; git checkout main; +mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false mvn clean; @@ -138,6 +148,8 @@ echo "MVN_VERSION_DEVELOP=\"${MVN_VERSION_DEVELOP}\"" > temp/constants.txt cd .. echo "Running maven clean and install -DskipTests"; +mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false mvn clean; mvn install -DskipTests; @@ -183,6 +195,8 @@ echo "Log in, then choose 'Build with Parameters' and type in ${MVN_VERSION_RELE 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 mvn clean # Set a new SNAPSHOT version @@ -230,12 +244,15 @@ gh pr create -B develop --title "sync develop branch after release ${MVN_VERSION echo "It's ok to merge this PR later, so wait for the Jenkins tests to finish." read -n 1 -srp "Press any key to continue (ctrl+c to cancel)"; printf "\n\n"; +mvn clean -Dmaven.clean.failOnError=false mvn clean -Dmaven.clean.failOnError=false git checkout develop mvn clean -Dmaven.clean.failOnError=false +mvn clean -Dmaven.clean.failOnError=false git checkout main 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"; diff --git a/scripts/templates/patch-release-notes.md b/scripts/templates/patch-release-notes.md index 0ca246c0fff..828c0056478 100644 --- a/scripts/templates/patch-release-notes.md +++ b/scripts/templates/patch-release-notes.md @@ -6,6 +6,6 @@ RDF4J ${MVN_VERSION_RELEASE} is a patch release that fixes ${NUMBER_OF_CLOSED_IS For a complete overview, see [all issues fixed in ${MVN_VERSION_RELEASE}](https://github.com/eclipse/rdf4j/milestone/${GITHUB_MILESTONE}?closed=1). -## Acknowledgements +### Acknowledgements This release was made possible by contributions from ???