From bf4d1c1677e41971b2c4fd8e9ffbf499b1ef36b0 Mon Sep 17 00:00:00 2001
From: Doug Hellmann <doug@doughellmann.com>
Date: Wed, 28 Mar 2018 09:19:10 -0400
Subject: [PATCH] check out the series branch when tagging a release

When a project is retired, the .gitreview file is removed. Without
that file, "git review -s" (run during cloning) fails, and the tag job
ends up failing.

This patch passes an assumed branch name to clone_repo.sh so that if
the stable branch for the series exists we get it. If the stable
branch does not exist, clone_repo.sh falls back to checking out
master.

Change-Id: Ib1221b5672c518eb8e3037232440807af6c90412
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
---
 roles/copy-release-tools-scripts/files/release-tools/release.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/copy-release-tools-scripts/files/release-tools/release.sh b/roles/copy-release-tools-scripts/files/release-tools/release.sh
index f4fa6fd89f..4b0f0199b4 100755
--- a/roles/copy-release-tools-scripts/files/release-tools/release.sh
+++ b/roles/copy-release-tools-scripts/files/release-tools/release.sh
@@ -56,7 +56,7 @@ else
 fi
 
 setup_temp_space release-tag-$SHORTNAME
-clone_repo $REPO
+clone_repo $REPO stable/$SERIES
 REPODIR="$(cd $REPO && pwd)"
 cd $REPODIR
 TARGETSHA=`git log -1 $SHA --format='%H'`