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
diff --git a/scripts/release/release.sh b/scripts/release/release.sh
index e72d563..76587e9 100755
--- a/scripts/release/release.sh
+++ b/scripts/release/release.sh
@@ -49,7 +49,12 @@
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 @@
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