Use automated release notes, if available.
PiperOrigin-RevId: 297628615
This commit is contained in:
parent
8fb84f78ad
commit
8e2b14fecf
|
@ -25,6 +25,14 @@ if ! [[ -v KOKORO_RELEASE_TAG ]]; then
|
|||
echo "No KOKORO_RELEASE_TAG provided." >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! [[ -v KOKORO_RELNOTES ]]; then
|
||||
echo "No KOKORO_RELNOTES provided." >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! [[ -r "${KOKORO_ARTIFACTS_DIR}/${KOKORO_RELNOTES}" ]]; then
|
||||
echo "The file '${KOKORO_ARTIFACTS_DIR}/${KOKORO_RELNOTES}' is not readable." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Unless an explicit releaser is provided, use the bot e-mail.
|
||||
declare -r KOKORO_RELEASE_AUTHOR=${KOKORO_RELEASE_AUTHOR:-gvisor-bot}
|
||||
|
@ -46,4 +54,7 @@ EOF
|
|||
fi
|
||||
|
||||
# Run the release tool, which pushes to the origin repository.
|
||||
tools/tag_release.sh "${KOKORO_RELEASE_COMMIT}" "${KOKORO_RELEASE_TAG}"
|
||||
tools/tag_release.sh \
|
||||
"${KOKORO_RELEASE_COMMIT}" \
|
||||
"${KOKORO_RELEASE_TAG}" \
|
||||
"${KOKORO_ARTIFACTS_DIR}/${KOKORO_RELNOTES}"
|
||||
|
|
|
@ -21,13 +21,19 @@
|
|||
set -xeu
|
||||
|
||||
# Check arguments.
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "usage: $0 <commit|revid> <release.rc>"
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "usage: $0 <commit|revid> <release.rc> <message-file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare -r target_commit="$1"
|
||||
declare -r release="$2"
|
||||
declare -r message_file="$3"
|
||||
|
||||
if ! [[ -r "${message_file}" ]]; then
|
||||
echo "error: message file '${message_file}' is not readable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
closest_commit() {
|
||||
while read line; do
|
||||
|
@ -64,6 +70,6 @@ fi
|
|||
|
||||
# Tag the given commit (annotated, to record the committer).
|
||||
declare -r tag="release-${release}"
|
||||
(git tag -m "Release ${release}" -a "${tag}" "${commit}" && \
|
||||
(git tag -F "${message_file}" -a "${tag}" "${commit}" && \
|
||||
git push origin tag "${tag}") || \
|
||||
(git tag -d "${tag}" && false)
|
||||
|
|
Loading…
Reference in New Issue