From 74488ff5da1111ccea86fec4c4a2cb20015d7521 Mon Sep 17 00:00:00 2001 From: Leon Mika Date: Wed, 5 Aug 2026 21:06:37 +1000 Subject: [PATCH] Fixed the broken source branch thing --- services.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services.go b/services.go index 3a55d65..428f8a6 100644 --- a/services.go +++ b/services.go @@ -8,6 +8,7 @@ import ( "os/exec" "strings" "text/template" + "time" ) type Services struct { @@ -69,13 +70,12 @@ func (s *Services) PushRepository() error { sourceBranch := s.cfg.LocalBranch if sourceBranch == "" { - // Get the current ref - ref, err := runCmdExpectingOutput("git", "rev-parse", "HEAD") - if err != nil { + makeTempBranch := fmt.Sprintf("release_%v", time.Now().Format(`20060102150405`)) + if err := runCmd("git", "checkout", "-b", makeTempBranch); err != nil { return err } - sourceBranch = strings.TrimSpace(ref) + sourceBranch = strings.TrimSpace(makeTempBranch) } remoteBranch := s.cfg.RemoteBranch if remoteBranch == "" {