Skip to content

Commit

Permalink
fix(cli): keep local commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianccm committed May 13, 2022
1 parent 88dcf46 commit a510b6c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func main() {

fmt.Println(changelog)

if backend == nil || !*createMergeRequest {
if !*createMergeRequest {
return
}

Expand Down Expand Up @@ -125,6 +125,10 @@ func main() {
Mode: git.HardReset,
}))

if backend == nil {
log.Printf("no backend configured, keeping changes in a local commit: %s", commit.String())
return
}
try(repo.Push(&git.PushOptions{
RemoteName: "origin",
RefSpecs: []config.RefSpec{config.RefSpec(commit.String() + ":refs/heads/semanticore/release")},
Expand Down

0 comments on commit a510b6c

Please sign in to comment.