From cc22deee0a03ed2003a28ae9206630917b4bd583 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 3 Oct 2017 21:57:58 +0100 Subject: [PATCH] scripts: sources-branch-updater-lib: Always fetch SHAs when working on master When working on master, we should get the latest code from external roles instead of the latest tag so ensure maximum compatibility with the OSA code. Change-Id: I83764ec2530537774cd7f130131a6628a697aaf9 --- scripts/sources-branch-updater-lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sources-branch-updater-lib.sh b/scripts/sources-branch-updater-lib.sh index ec500ad26b..0bcaf39537 100644 --- a/scripts/sources-branch-updater-lib.sh +++ b/scripts/sources-branch-updater-lib.sh @@ -229,8 +229,8 @@ update_ansible_role_requirements() { role_name=$(sed 's/^[ \t-]*//' ansible-role-requirements.yml | awk '/src: / || /name: / {print $2}' | grep -B1 "${role_src}" | head -n 1) echo "... updating ${role_name}" - # If the role_src is NOT from git.openstack.org, try to get a tag first - if [[ ${role_src} != *"git.openstack.org"* ]]; then + # If the role_src is NOT from git.openstack.org, try to get a tag first unless we are working on master + if [[ ${role_src} != *"git.openstack.org"* ]] && [[ "${force_master}" != "true" ]]; then role_version=$(git ls-remote --tags ${role_src} | awk '{print $2}' | grep -v '{}' | cut -d/ -f 3 | sort -n | tail -n 1) fi