Skip to content

Commit 9185e3c

Browse files
committed
Pass the branch and dev version to prepare-release
as through options to not break the script logic Signed-off-by: marko-bekhta <[email protected]>
1 parent a183511 commit 9185e3c

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

prepare-release.sh

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
#!/usr/bin/env -S bash -e
22

3+
# Default to a well-known CI environment variable
4+
BRANCH="$BRANCH_NAME"
5+
6+
while getopts 'd:b:' opt; do
7+
case "$opt" in
8+
b)
9+
BRANCH="$OPTARG"
10+
;;
11+
d)
12+
DEVELOPMENT_VERSION="$OPTARG"
13+
;;
14+
\?)
15+
usage
16+
exit 1
17+
;;
18+
esac
19+
done
20+
shift $((OPTIND - 1))
21+
322
SCRIPTS_DIR="$(readlink -f ${BASH_SOURCE[0]} | xargs dirname)"
423

524
PROJECT=$1
625
RELEASE_VERSION=$2
726
INHERITED_VERSION=$3
8-
DEVELOPMENT_VERSION=$3
27+
if [ -n "$3" ]; then
28+
DEVELOPMENT_VERSION=$3
29+
fi
930
WORKSPACE=${WORKSPACE:-'.'}
1031

1132
if [ -z "$PROJECT" ]; then

release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ if [ "$PUSH_CHANGES" != "true" ]; then
194194
ADDITIONAL_OPTIONS="-d"
195195
fi
196196

197-
bash -xe "$SCRIPTS_DIR/prepare-release.sh" "$PROJECT" "$RELEASE_VERSION"
197+
bash -xe "$SCRIPTS_DIR/prepare-release.sh" -b "$BRANCH" -d "$DEVELOPMENT_VERSION" "$PROJECT" "$RELEASE_VERSION"
198198

199199
#bash -xe "$SCRIPTS_DIR/jira-release.sh" $ADDITIONAL_OPTIONS "$JIRA_PROJECT" "$RELEASE_VERSION_BASIS" "$NEXT_VERSION_BASIS"
200200

0 commit comments

Comments
 (0)