Skip to content

Commit 4c1573f

Browse files
committed
fix gorepomod release
1 parent aa4afc5 commit 4c1573f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/release-cmd-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ jobs:
9494
git config --global user.name "Development"
9595
git remote add upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/antoooks/kustomize.git"
9696
git remote -v
97+
gorepomod pin kyaml --local --doIt
9798
git add --all
9899
git commit -m "pin kyaml" || true
99100
git push
100-
gorepomod pin kyaml --local --doIt
101101
- name: Release cmd/config
102102
run: |
103103
gorepomod release cmd/config ${{ inputs.release_type }} --local --doIt

cmd/gorepomod/internal/git/runner.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ func (gr *Runner) AssureOnMainBranch() error {
258258
// CheckoutMainBranch does that.
259259
func (gr *Runner) CheckoutMainBranch() error {
260260
gr.comment("checking out main branch")
261-
fullBranchSpec := fmt.Sprintf("%s/%s", "origin", mainBranch)
261+
fullBranchSpec := fmt.Sprintf("%s/%s", remoteOrigin, mainBranch)
262262
return gr.runNoOut(noHarmDone, "checkout", fullBranchSpec)
263263
}
264264

@@ -278,9 +278,8 @@ func (gr *Runner) FetchRemote(remote misc.TrackedRepo) error {
278278

279279
// MergeFromRemoteMain does a fast forward only merge with main branch.
280280
func (gr *Runner) MergeFromRemoteMain(remote misc.TrackedRepo) error {
281-
fullBranchSpec := fmt.Sprintf("%s/%s", "origin", mainBranch)
282281
remo := strings.Join(
283-
[]string{string(remote), fullBranchSpec}, pathSep)
282+
[]string{string(remote), mainBranch}, pathSep)
284283
gr.comment("merging from remote")
285284
return gr.runNoOut(undoPainful, "merge", "--ff-only", remo)
286285
}

0 commit comments

Comments
 (0)