From d7ad2809417455e06a5d79e237759e0ac507eb45 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 12 May 2022 19:03:13 +0000 Subject: [PATCH] build: set the default branch of the ephemeral repo for publishing build artifacts to main (#45974) It looks like because the primary branch for our ephemeral repos doesn't match the build repos we are pushing to it causes errors around shallow clones. This attempts to prevent this. PR Close #45974 --- scripts/ci/publish-build-artifacts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/publish-build-artifacts.sh b/scripts/ci/publish-build-artifacts.sh index 178daf6431c..2a582a8ee6d 100755 --- a/scripts/ci/publish-build-artifacts.sh +++ b/scripts/ci/publish-build-artifacts.sh @@ -47,7 +47,7 @@ function publishRepo { mkdir -p $REPO_DIR ( cd $REPO_DIR && \ - git init && \ + git init -b main && \ git remote add origin $REPO_URL && \ # use the remote branch if it exists if git ls-remote --exit-code origin ${BRANCH}; then