File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,15 @@ if [[ "$(git status --porcelain | wc -l)" == 0 ]]; then
2222fi
2323
2424today=" $( date +" %Y-%m-%d" ) "
25+ repo_url=" https://github.com/google/gvisor.git"
2526pgo_branch_name=" pgo/update-${today} "
27+ existing_remote=" $( git ls-remote --heads " $repo_url " " refs/heads/${pgo_branch_name} " || true) "
28+ if [[ -n " $existing_remote " ]]; then
29+ echo " Remote branch '$pgo_branch_name ' already exists, skipping." >&2
30+ exit 0
31+ fi
2632git stash
27- git pull --rebase=true https://github.com/google/gvisor master
33+ git pull --rebase=true " $repo_url " master
2834git checkout -b " $pgo_branch_name "
2935git stash pop
3036git add runsc/profiles
@@ -37,7 +43,7 @@ export GIT_AUTHOR_EMAIL=gvisor-bot@google.com
3743export GIT_COMMITTER_NAME=gvisor-bot
3844export GIT_COMMITTER_EMAIL=gvisor-bot@google.com
3945git commit -m " Update runsc profiles for PGO (profile-guided optimizations), $today ."
40- git push --set-upstream https://github.com/google/gvisor.git " $pgo_branch_name "
46+ git push --set-upstream " $repo_url " " $pgo_branch_name "
4147
4248# The 'yes' command will fail when the `gh` command closes its stdin,
4349# which the `pipefail` option treats as a total failure.
You can’t perform that action at this time.
0 commit comments