Compare commits

..

No commits in common. "ed70faa8548a7cee262bef29dbecfe55b605c6b0" and "366102b55bd788ab375d736cac296c7cbc40ddc0" have entirely different histories.

View file

@ -8,7 +8,6 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"text/template" "text/template"
"time"
) )
type Services struct { type Services struct {
@ -74,12 +73,13 @@ func (s *Services) PushRepository() error {
sourceBranch := s.cfg.LocalBranch sourceBranch := s.cfg.LocalBranch
if sourceBranch == "" { if sourceBranch == "" {
makeTempBranch := fmt.Sprintf("release_%v", time.Now().Format(`20060102150405`)) // Get the current ref
if err := runCmd("git", "checkout", "-b", makeTempBranch); err != nil { ref, err := runCmdExpectingOutput("git", "rev-parse", "HEAD")
if err != nil {
return err return err
} }
sourceBranch = strings.TrimSpace(makeTempBranch) sourceBranch = strings.TrimSpace(ref)
} }
remoteBranch := s.cfg.RemoteBranch remoteBranch := s.cfg.RemoteBranch
if remoteBranch == "" { if remoteBranch == "" {