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
This commit is contained in:
Markos Chandras
2017-10-03 21:57:58 +01:00
parent a95896d0d2
commit cc22deee0a

View File

@@ -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