Skip to content

Commit

Permalink
Rollback of commit 96297ed.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Roll-forward with fix

*** Original change description ***

Automated [] rollback of commit ffc0d2d.

*** Reason for rollback ***

Grr I knew I shouldn't have done 2 changes in one tests are failing now

Fixes bazelbuild#2429.

*** Original change description ***

Release scripts: factor out the push to notes and fix a typo

--
PiperOrigin-RevId: 145662713
MOS_MIGRATED_REVID=145662713
  • Loading branch information
damienmg authored and laszlocsomor committed Jan 26, 2017
1 parent dd04adf commit 015edb0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions scripts/release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 015edb0

Please sign in to comment.