aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/release
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-10-28 15:15:36 +0000
committerGravatar John Cater <jcater@google.com>2016-10-28 16:04:13 +0000
commit6d46bdf0782db5ec1a43a352408401664ae9c630 (patch)
tree3e0d8553feea050f27774ec5cdaf55e0fc69ea60 /scripts/release
parent8cafffca2ab2d0a6fde834760167f5cf2d11f888 (diff)
Print a summary of what the create command did
Added an echo to print "Created 1.2.3RC4 on branch release-1.2.3." when `release.sh create` runs, to save people from the mistake I made (pushing the first RC as "RC3"). I also added a line to bounce the shell back to the original branch the user was on, since it's a bit weird to have the script exit and be on a different branch. -- MOS_MIGRATED_REVID=137512849
Diffstat (limited to 'scripts/release')
-rwxr-xr-xscripts/release/release.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/release/release.sh b/scripts/release/release.sh
index e72d56351f..76587e9043 100755
--- a/scripts/release/release.sh
+++ b/scripts/release/release.sh
@@ -49,7 +49,12 @@ function set_release_name() {
git notes --ref=release remove 2>/dev/null || true
git notes --ref=release-candidate remove 2>/dev/null || true
git notes --ref=release append -m "$1"
- [ -z "${2-}" ] || git notes --ref=release-candidate append -m "$2"
+ local relname="$1"
+ if [[ ! -z "${2-}" ]]; then
+ git notes --ref=release-candidate append -m "$2"
+ relname="${relname}RC${2}"
+ fi
+ echo "$relname"
}
# Trim empty lines at the beginning and the end of the buffer.
@@ -187,10 +192,11 @@ function create_release() {
release_note_editor ${tmpfile} "${origin_branch}" "${branch_name}"
local relnotes="$(cat ${tmpfile})"
- echo "Creating the release commit"
create_release_commit "${release_title}" "${release_name}" \
"${relnotes}" "${tmpfile}" "${baseline}" $@
- set_release_name "${release_name}" "${rc}"
+ release_name=$(set_release_name "${release_name}" "${rc}")
+ git checkout ${origin_branch} &> /dev/null
+ echo "Created ${release_name} on branch ${branch_name}."
rm -f ${tmpfile} ${tmpfile2}
trap - EXIT