scripts: sources-branch-updater: Make regexp for master branch stricter

The regexp does not work properly when the upstream repo has many
branches named 'master' such as ceph-ansible

0fa368a7441528457b7bcb99f8a860d7987b9ba6 refs/heads/guits-update_req_master
79bd06ad28d8a078bd95923b230eb8d5b66095b2 refs/heads/master

which breaks the script when bumping SHAs. As such, lets make it
stricter by simply matching /master$ instead.

Change-Id: I24526a358d7a21821f8c9789ba199863981f8d7b
(cherry picked from commit a9c72408be)
This commit is contained in:
Markos Chandras 2018-10-05 16:48:04 +01:00 committed by Markos Chandras (hwoarang)
parent 6d5c6dc1b4
commit e77ef140e6
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ update_ansible_role_requirements() {
# If we are forcing master and we still don't have a role_version defined, then we need
# to fallback to master branch
if [[ -z "${role_version}" ]] && [[ "${force_master}" == "true" ]]; then
role_version=$(git ls-remote ${role_src} | grep master | awk '{print $1}')
role_version=$(git ls-remote ${role_src} | grep /master$ | awk '{print $1}')
fi
# For OSA roles, get the release notes