-#!/bin/bash -x
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
# This script generates Service Release notes and appends them to the release
# notes in the docs project and submits a patch.
-RELEASE=${RELEASE:-$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep generate-release-notes | awk '{print $2}')}
+set -x
+
+pip install --user --quiet --upgrade git-review
+
+RELEASE=${RELEASE:-$(echo "$GERRIT_EVENT_COMMENT_TEXT" | base64 -d | grep generate-release-notes | awk '{print $2}')}
if [ -z "$RELEASE" ]; then
echo "ERROR: The RELEASE variable is not set."
exit 1
cp "$WORKSPACE/release-notes.rst" "docs/release-notes/release-notes-${RELEASE,,}.rst"
git add docs/release-notes/
-GERRIT_COMMIT_MESSAGE="Update release notes"
+GERRIT_COMMIT_MESSAGE="Update release notes for $RELEASE"
GERRIT_TOPIC="autogenerate-release-notes"
CHANGE_ID=$(ssh -p 29418 "jenkins-$SILO@git.opendaylight.org" gerrit query \
limit:1 owner:self is:open project:docs \