Setup gerrit.username properly with git-config
[releng/builder.git] / jjb / autorelease / branch-cut.sh
index 02df34e2214174dad41b8811c561c7a0fed7acfc..90ab655bb02d38d6dd394579a89e82b6b2c5c1f6 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -30,10 +30,16 @@ set -eu -o pipefail
 
 # Validate inputs
 if [ -z "$RELEASE" ]; then
-    echo "ERROR: RELEASE variable most be set to a release name. Eg Carbon"
+    echo "ERROR: RELEASE variable must be set to a release name. Eg Carbon"
     exit 1
 fi
 
+# Setup Gerrit remote to ensure Change-Id gets set on commit.
+git config --global --add gitreview.username "jenkins-$SILO"
+git remote -v
+git submodule foreach git review -s
+git review -s
+
 # --- Start create new maintenance branch
 echo "---> Creating new mainenance branch"
 git submodule foreach git fetch origin