Compare commits

...

2 Commits

Author SHA1 Message Date
jolheiser c404599204
fix goreleaser versioning
ci/woodpecker/push/goreleaser Pipeline was successful Details
ci/woodpecker/tag/goreleaser Pipeline was successful Details
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-10-04 09:01:46 -05:00
jolheiser 9a09094080
remove isClean
Fixes #1

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-10-04 09:00:29 -05:00
4 changed files with 2 additions and 12 deletions

View File

@ -6,7 +6,7 @@ builds:
- windows
- darwin
ldflags:
- "-s -w -X main.Version={{.Version}}"
- "-s -w -X go.jolheiser.com/git-ea/cmd.Version={{.Version}}"
archives:
- replacements:
386: i386

View File

@ -11,7 +11,6 @@ import (
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/peterbourgon/ff/v3/ffcli"
"github.com/rs/zerolog/log"
"github.com/skratchdot/open-golang/open"
)
@ -47,10 +46,6 @@ func (h *Handler) Backport() *ffcli.Command {
h.fetch(ctx)
if isClean() {
log.Fatal().Msg("working tree is dirty")
}
from := *fromFlag
if from == "" {
from = "main"

View File

@ -57,7 +57,7 @@ func (h *Handler) Branch() *ffcli.Command {
case strings.HasPrefix(base, "u/"):
base = "upstream/" + strings.TrimPrefix(base, "u/")
}
if (!strings.HasPrefix(base, "upstream") || !strings.HasPrefix(base, "origin")) && !strings.HasPrefix(base, "pr-") {
if !strings.HasPrefix(base, "upstream") && !strings.HasPrefix(base, "origin") && !strings.HasPrefix(base, "pr-") {
base = fmt.Sprintf("upstream/%s", base)
}

View File

@ -11,7 +11,6 @@ import (
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/peterbourgon/ff/v3/ffcli"
"github.com/rs/zerolog/log"
)
func (h *Handler) Frontport() *ffcli.Command {
@ -40,10 +39,6 @@ func (h *Handler) Frontport() *ffcli.Command {
h.fetch(ctx)
if !isClean() {
log.Fatal().Msg("working tree is dirty")
}
commits, err := h.repo().Log(&git.LogOptions{
From: h.head(from),
})