diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2017-01-25 17:49:47 +0000 |
---|---|---|
committer | Laszlo Csomor <laszlocsomor@google.com> | 2017-01-25 22:23:42 +0000 |
commit | ffc0d2df0213123a4451bed5850827319afcdeee (patch) | |
tree | 1cbecab61f70b6cae22a0cb146a772db7890ed5b /scripts/release/release.sh | |
parent | 17a1ae9efd999cde0fd7d184f06512ba4b9e8f35 (diff) |
Release scripts: factor out the push to notes and fix a typo
--
PiperOrigin-RevId: 145559628
MOS_MIGRATED_REVID=145559628
Diffstat (limited to 'scripts/release/release.sh')
-rwxr-xr-x | scripts/release/release.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/scripts/release/release.sh b/scripts/release/release.sh index 988c497d6d..defb013f92 100755 --- a/scripts/release/release.sh +++ b/scripts/release/release.sh @@ -274,19 +274,24 @@ function push_if_exists() { fi } -# Push the release branch to the release repositories so a release -# candidate can be created. -function push_release_candidate() { - local branch="$(get_release_branch)" +# Push release notes refs but also a given ref +function push_notes_and_ref() { + local ref="$1" for repo in ${RELEASE_REPOSITORIES}; do - push_if_exists "${repo}" "${branch}" + push_if_exists "${repo}" "${ref}" push_if_exists "${repo}" "refs/notes/release" - push_if_exists "${repo}" "refs/notes/release-candidates" + push_if_exists "${repo}" "refs/notes/release-candidate" push_if_exists "${repo}" "refs/notes/release-notes" push_if_exists "${repo}" "refs/notes/cherrypick" done } +# Push the release branch to the release repositories so a release +# candidate can be created. +function push_release_candidate() { + push_notes_and_ref "$(get_release_branch)" +} + # Deletes the release branch after a release or abandoning the release function cleanup_branches() { local tag_name=$1 @@ -335,12 +340,7 @@ function do_release() { for i in $MASTER_REPOSITORIES; do git push $i +master done - for i in $RELEASE_REPOSITORIES; do - git push $i +refs/tags/${tag_name} - git push $i +refs/notes/release-candidate - git push $i +refs/notes/release - git push $i +refs/notes/release-notes - done + push_notes_and_ref "+refs/tags/${tag_name}" cleanup_branches ${tag_name} fi } |