You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bahir.apache.org by es...@apache.org on 2022/07/30 15:41:13 UTC

[bahir-flink] branch release-1.1 updated: [BAHIR-304] Fix release scripts

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

eskabetxe pushed a commit to branch release-1.1
in repository https://gitbox.apache.org/repos/asf/bahir-flink.git


The following commit(s) were added to refs/heads/release-1.1 by this push:
     new 283f992  [BAHIR-304] Fix release scripts
283f992 is described below

commit 283f992fbb9d0b7a602aba85b1e1f682d238a60c
Author: Joao Boto <bo...@boto.pro>
AuthorDate: Wed Jul 6 11:53:33 2022 +0200

    [BAHIR-304] Fix release scripts
---
 dev/release-build.sh | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/dev/release-build.sh b/dev/release-build.sh
index 670433a..3c03e88 100755
--- a/dev/release-build.sh
+++ b/dev/release-build.sh
@@ -32,7 +32,7 @@ Use maven infrastructure to create a project release package and publish
 to staging release location (https://dist.apache.org/repos/dist/dev/bahir/bahir-flink)
 and maven staging release repository.
 
---release-prepare --releaseVersion="1.0" --developmentVersion="1.1-SNAPSHOT" [--releaseRc="rc1"] [--tag="v1.0"] [--gitCommitHash="a874b73"]
+--release-prepare --releaseVersion="1.0" --developmentVersion="1.1-SNAPSHOT" [--releaseRc="rc1"] [--tag="v1.0"] [--gitCommitHash="a874b73"] [--gitBranch="release-1.0"]
 This form execute maven release:prepare and upload the release candidate distribution
 to the staging release location.
 
@@ -51,6 +51,7 @@ OPTIONS
 --releaseRc          - Release RC identifier used when publishing, default 'rc1'
 --tag                - Release Tag identifier used when taging the release, default 'v$releaseVersion'
 --gitCommitHash      - Release tag or commit to build from, default master HEAD
+--gitBranch          - Release branch used when checking out the code to be released
 --dryRun             - Dry run only, mostly used for testing.
 
 A GPG passphrase is expected as an environment variable
@@ -60,7 +61,7 @@ GPG_PASSPHRASE - Passphrase for GPG key used to sign release
 EXAMPLES
 
 release-build.sh --release-prepare --releaseVersion="1.0" --developmentVersion="1.1-SNAPSHOT"
-release-build.sh --release-prepare --releaseVersion="1.0" --developmentVersion="1.1-SNAPSHOT" --releaseRc="rc1" --tag="v1.0"
+release-build.sh --release-prepare --releaseVersion="1.0" --developmentVersion="1.1-SNAPSHOT" --releaseRc="rc1" --tag="v1.0" --gitBranch="release-1.0"
 release-build.sh --release-prepare --releaseVersion="1.0" --developmentVersion="1.1-SNAPSHOT" --releaseRc="rc1" --tag="v1.0"  --gitCommitHash="a874b73" --dryRun
 
 release-build.sh --release-publish --gitCommitHash="a874b73"
@@ -103,6 +104,10 @@ while [ "${1+defined}" ]; do
       GIT_REF="${PARTS[1]}"
       shift
       ;;
+    --gitBranch)
+      GIT_BRANCH="${PARTS[1]}"
+      shift
+      ;;
     --gitTag)
       GIT_TAG="${PARTS[1]}"
       shift
@@ -160,6 +165,13 @@ if [[ "$RELEASE_PREPARE" == "true" && -z "$DEVELOPMENT_VERSION" ]]; then
     exit_with_usage
 fi
 
+if [[ "$RELEASE_PREPARE" == "true"  ]]; then
+    if [[ "$GIT_REF" && "$GIT_BRANCH" ]]; then
+        echo "ERROR: Only one argument permitted when publishing : --gitCommitHash or --gitBranch"
+        exit_with_usage
+    fi
+fi
+
 if [[ "$RELEASE_PUBLISH" == "true"  ]]; then
     if [[ "$GIT_REF" && "$GIT_TAG" ]]; then
         echo "ERROR: Only one argumented permitted when publishing : --gitCommitHash or --gitTag"
@@ -181,8 +193,11 @@ if [[ "$RELEASE_SNAPSHOT" == "true" && "$DRY_RUN" ]]; then
     exit_with_usage
 fi
 
-# Commit ref to checkout when building
+# commit ref to checkout when building
 GIT_REF=${GIT_REF:-master}
+if [[ "$RELEASE_PREPARE" == "true" && "$GIT_BRANCH" ]]; then
+    GIT_REF="$GIT_BRANCH"
+fi
 if [[ "$RELEASE_PUBLISH" == "true" && "$GIT_TAG" ]]; then
     GIT_REF="tags/$GIT_TAG"
 fi