From 7ade500e7f3c36e0dcd9e2f6738ad10bce934d57 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 18 Dec 2018 05:19:38 +0100 Subject: [PATCH] build: force push publish artifacts script (#14489) * Similarly to `angular/angular`, we should publish our artifacts using `git push --force`. This avoids the race condition where another CI job pushes to the builds repository before we try to push with our outdated `HEAD`. --- scripts/deploy/publish-build-artifacts.sh | 2 +- scripts/deploy/publish-docs-content.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/deploy/publish-build-artifacts.sh b/scripts/deploy/publish-build-artifacts.sh index 2a9bea28331..29d3f4565a2 100755 --- a/scripts/deploy/publish-build-artifacts.sh +++ b/scripts/deploy/publish-build-artifacts.sh @@ -106,7 +106,7 @@ publishPackage() { git add -A git commit --allow-empty -m "${buildCommitMessage}" git tag "${buildTagName}" - git push origin ${branchName} --tags + git push origin ${branchName} --tags --force echo "Published package artifacts for ${packageName}#${buildVersionName} into ${branchName}" } diff --git a/scripts/deploy/publish-docs-content.sh b/scripts/deploy/publish-docs-content.sh index eec9915d340..5eb2b5f902d 100755 --- a/scripts/deploy/publish-docs-content.sh +++ b/scripts/deploy/publish-docs-content.sh @@ -124,6 +124,6 @@ echo "Credentials for docs-content repository are now set up. Publishing.." git add -A git commit --allow-empty -m "${buildCommitMessage}" git tag "${buildTagName}" -git push origin ${branchName} --tags +git push origin ${branchName} --tags --force echo "Published docs-content for ${buildVersionName} into ${branchName} successfully"