You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2023/01/24 20:56:54 UTC

[maven-mvnd] branch mvnd-0.9.x updated: Fix release build script to work from branches (hardcoded)

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch mvnd-0.9.x
in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git


The following commit(s) were added to refs/heads/mvnd-0.9.x by this push:
     new 08c60d20 Fix release build script to work from branches (hardcoded)
08c60d20 is described below

commit 08c60d202438c087b53c422fa6154696aa127ab6
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Tue Jan 24 21:56:43 2023 +0100

    Fix release build script to work from branches (hardcoded)
---
 build/release-build.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/build/release-build.sh b/build/release-build.sh
index 2a734ac2..fa0a85ef 100755
--- a/build/release-build.sh
+++ b/build/release-build.sh
@@ -19,6 +19,7 @@
 set -e
 export VERSION=$1
 export NEXT_VERSION=$2
+export BRANCH=0.9.x
 
 if [ "${VERSION}x" = "x" ] || [ "${NEXT_VERSION}x" = "x" ]
 then
@@ -42,9 +43,9 @@ startup_check()
       local branch
       branch=${branch_ref##refs/heads/}
 
-      if [ "$branch" != "master" ]
+      if [ "$branch" != "$BRANCH" ]
       then
-        echo "Not working on the master - cannot proceed"
+        echo "Not working on the $BRANCH - cannot proceed"
         exit 1
       fi
 
@@ -68,7 +69,7 @@ startup_check()
       fi
 
       if [[ $unpull -gt 0 ]]; then
-        echo "There are changes which have not been pulled - cannot proceed. The following commits have been added to master since your last pull:"
+        echo "There are changes which have not been pulled - cannot proceed. The following commits have been added to $BRANCH since your last pull:"
         local unpulled
         unpulled=$(git rev-list $branch..$branch_origin)
         for commit in $unpulled; do
@@ -138,4 +139,4 @@ mvn versions:set -DnewVersion=$NEXT_VERSION
 # commit
 git add -A
 git commit -m "Next is $NEXT_VERSION"
-git push origin master
+git push origin $BRANCH