Run release-notes tool only when we actually pull commits into the release branch
@@ -140,6 +140,7 @@ if [[ $CLIENT_VERSION != *"snapshot"* ]]; then
git pull -X theirs upstream master --no-edit
# Collect release notes from master branch
+ if [[ $(git log ${remote_branch}..upstream/master | grep ^commit) ]]; then
start_sha=$(git log ${remote_branch}..upstream/master | grep ^commit | tail -n1 | sed 's/commit //g')
end_sha=$(git log ${remote_branch}..upstream/master | grep ^commit | head -n1 | sed 's/commit //g')
output="/tmp/python-master-relnote.md"
@@ -162,6 +163,7 @@ if [[ $CLIENT_VERSION != *"snapshot"* ]]; then
git commit -m "update changelog with release notes from master branch"
fi
fi
+fi
# Update version constants
sed -i "s/^KUBERNETES_BRANCH =.*$/KUBERNETES_BRANCH = \"$KUBERNETES_BRANCH\"/g" scripts/constants.py
