mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 16:57:40 +03:00
blackduck update: do not fail if branch already exists (#17417)
This commit is contained in:
parent
ce3fcf1d8c
commit
8494cff36a
@ -174,8 +174,11 @@ jobs:
|
||||
latest=$(git ls-remote https://github.com/DACH-NY/security-blackduck.git master | awk '{print $1}')
|
||||
current=$(cat ci/blackduck.yml | grep blackduck_script_sha: | head -1 | cut -f2 -d: | cut -c2- )
|
||||
|
||||
if [ "$current" != "$latest" ]; then
|
||||
branch="bump-blackduck-script-${latest:0:8}"
|
||||
branch="bump-blackduck-script-${latest:0:8}"
|
||||
|
||||
if git ls-remote --exit-code --heads https://github.com/digital-asset/daml.git refs/heads/$branch >/dev/null; then
|
||||
echo "$branch already exists, nothing to do."
|
||||
elif [ "$current" != "$latest" ]; then
|
||||
echo "s|blackduck_script_sha: $current|blackduck_script_sha: $latest|"
|
||||
sed -i "s|blackduck_script_sha: $current|blackduck_script_sha: $latest|" ci/blackduck.yml
|
||||
git add ci/blackduck.yml
|
||||
|
Loading…
Reference in New Issue
Block a user