forked from apache/beam
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust build_release_candidate.sh to use existing tag
- Loading branch information
1 parent
e3a7c26
commit b817a1c
Showing
2 changed files
with
19 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ RC= | |
COMMIT= | ||
PUSH_TAG=no | ||
CLONE=no | ||
OVERWRITE=no | ||
DEBUG= | ||
[email protected]:apache/beam | ||
|
||
|
@@ -66,6 +67,11 @@ while [[ $# -gt 0 ]] ; do | |
shift | ||
;; | ||
|
||
--overwrite) | ||
OVERWRITE=yes | ||
shift | ||
;; | ||
|
||
--clone) | ||
CLONE=yes | ||
shift | ||
|
@@ -113,6 +119,16 @@ fi | |
bash "$SCRIPT_DIR/set_version.sh" "${RELEASE}" --release --git-add $DEBUG | ||
git checkout --quiet "$COMMIT" # suppress warning about detached HEAD: we want it detached so we do not edit the branch | ||
git commit -m "Set version for ${RELEASE} RC${RC}" | ||
|
||
if git rev-parse "$RC_TAG" >/dev/null 2>&1; then | ||
if [[ "$OVERWRITE" == yes ]]; then | ||
git push origin ":refs/tags/$RC_TAG" | ||
else | ||
echo "Tag $RC_TAG already exists. Either delete it manually or run with --overwrite. Do not overwrite if an RC has been built and shared!" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
git tag -a -m "$RC_TAG" "$RC_TAG" HEAD | ||
|
||
if [[ "$PUSH_TAG" == yes ]] ; then | ||
|