From a510b6c2dcd47c27e7461a25d091400a27dfc897 Mon Sep 17 00:00:00 2001 From: Bastian Ike Date: Fri, 13 May 2022 10:47:28 +0200 Subject: [PATCH] fix(cli): keep local commit --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 88df5a9..c7dbc0f 100644 --- a/main.go +++ b/main.go @@ -71,7 +71,7 @@ func main() { fmt.Println(changelog) - if backend == nil || !*createMergeRequest { + if !*createMergeRequest { return } @@ -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")},