diff --git a/cmd/gorepomod/internal/git/runner.go b/cmd/gorepomod/internal/git/runner.go index 5b49f9a5f..dac244d58 100644 --- a/cmd/gorepomod/internal/git/runner.go +++ b/cmd/gorepomod/internal/git/runner.go @@ -258,8 +258,7 @@ func (gr *Runner) AssureOnMainBranch() error { // CheckoutMainBranch does that. func (gr *Runner) CheckoutMainBranch() error { gr.comment("checking out main branch") - fullBranchSpec := fmt.Sprintf("%s/%s", remoteOrigin, mainBranch) - return gr.runNoOut(noHarmDone, "checkout", fullBranchSpec) + return gr.runNoOut(noHarmDone, "checkout", mainBranch) } // FetchRemote does that. diff --git a/releasing/helpers.sh b/releasing/helpers.sh index acec8eedc..4da68f151 100644 --- a/releasing/helpers.sh +++ b/releasing/helpers.sh @@ -2,20 +2,12 @@ # Copyright 2022 The Kubernetes Authors. # SPDX-License-Identifier: Apache-2.0 -ORIGIN_MASTER="feat/5449-add-release-automation" -UPSTREAM_REPO="upstream" -UPSTREAM_MASTER="master" function createBranch { branch=$1 title=$2 echo "Making branch $branch : \"$title\"" - # Check if release branch exists - if git show-ref --quiet "refs/heads/${branch}"; then - git fetch --tags upstream master - git checkout $ORIGIN_MASTER - git branch -D $branch # delete if it exists - fi + git branch -D $branch # delete if it exists git checkout -b $branch git commit -a -m "$title" git push -f origin $branch