You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-11-06 09:09:29 +02:00
feat: replacing the log library (#3139)
* feat: replacing logs Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: tests et al Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * feat: update termenv/lipgloss Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * wip: output Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: pin dep Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: update Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: tests Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: tests Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: deps Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: dep Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
dd66aac903
commit
fe7e2123bd
@@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"sort"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/fileglob"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
)
|
||||
|
||||
// Type defines the type of an artifact.
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/builders/buildtarget"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/google/go-github/v45/github"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
|
||||
@@ -7,14 +7,15 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/apex/log/handlers/cli"
|
||||
"github.com/fatih/color"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
const baseURL = "https://goreleaser.com/deprecations#"
|
||||
|
||||
var warnStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("11")).Bold(true)
|
||||
|
||||
// Notice warns the user about the deprecation of the given property.
|
||||
func Notice(ctx *context.Context, property string) {
|
||||
NoticeCustom(ctx, property, "`{{ .Property }}` should not be used anymore, check {{ .URL }} for more info")
|
||||
@@ -22,20 +23,9 @@ func Notice(ctx *context.Context, property string) {
|
||||
|
||||
// NoticeCustom warns the user about the deprecation of the given property.
|
||||
func NoticeCustom(ctx *context.Context, property, tmpl string) {
|
||||
ctx.Deprecated = true
|
||||
// XXX: this is very ugly!
|
||||
oldHandler, ok := log.Log.(*log.Logger).Handler.(*cli.Handler)
|
||||
if !ok {
|
||||
// probably in a test, and the cli logger wasn't set
|
||||
return
|
||||
}
|
||||
w := oldHandler.Writer
|
||||
handler := cli.New(w)
|
||||
handler.Padding = cli.Default.Padding + 3
|
||||
log := &log.Logger{
|
||||
Handler: handler,
|
||||
Level: log.InfoLevel,
|
||||
}
|
||||
log.IncreasePadding()
|
||||
defer log.DecreasePadding()
|
||||
|
||||
// replaces . and _ with -
|
||||
url := baseURL + strings.NewReplacer(
|
||||
".", "",
|
||||
@@ -50,7 +40,9 @@ func NoticeCustom(ctx *context.Context, property, tmpl string) {
|
||||
}); err != nil {
|
||||
panic(err) // this should never happen
|
||||
}
|
||||
log.Warn(color.New(color.Bold, color.FgHiYellow).Sprintf(out.String()))
|
||||
|
||||
ctx.Deprecated = true
|
||||
log.Warn(warnStyle.Render(out.String()))
|
||||
}
|
||||
|
||||
type templateData struct {
|
||||
|
||||
@@ -4,20 +4,20 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/apex/log/handlers/cli"
|
||||
"github.com/fatih/color"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/goreleaser/goreleaser/internal/golden"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
"github.com/muesli/termenv"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestNotice(t *testing.T) {
|
||||
var w bytes.Buffer
|
||||
lipgloss.SetColorProfile(termenv.Ascii)
|
||||
|
||||
color.NoColor = true
|
||||
log.SetHandler(cli.New(&w))
|
||||
var w bytes.Buffer
|
||||
log.Log = log.New(&w)
|
||||
|
||||
log.Info("first")
|
||||
ctx := context.New(config.Project{})
|
||||
@@ -29,10 +29,10 @@ func TestNotice(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNoticeCustom(t *testing.T) {
|
||||
var w bytes.Buffer
|
||||
lipgloss.SetColorProfile(termenv.Ascii)
|
||||
|
||||
color.NoColor = true
|
||||
log.SetHandler(cli.New(&w))
|
||||
var w bytes.Buffer
|
||||
log.Log = log.New(&w)
|
||||
|
||||
log.Info("first")
|
||||
ctx := context.New(config.Project{})
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
• first
|
||||
• DEPRECATED: `foo.bar.whatever: foobar` should not be used anymore, check https://goreleaser.com/deprecations#foobarwhatever-foobar for more info
|
||||
• last
|
||||
• first
|
||||
• DEPRECATED: `foo.bar.whatever: foobar` should not be used anymore, check https://goreleaser.com/deprecations#foobarwhatever-foobar for more info
|
||||
• last
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
• first
|
||||
• DEPRECATED: some custom template with a url https://goreleaser.com/deprecations#something-else
|
||||
• last
|
||||
• first
|
||||
• DEPRECATED: some custom template with a url https://goreleaser.com/deprecations#something-else
|
||||
• last
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/go-shellwords"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/extrafiles"
|
||||
"github.com/goreleaser/goreleaser/internal/gio"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/fileglob"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
)
|
||||
|
||||
// Copy recursively copies src into dst with src's file modes.
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
)
|
||||
|
||||
// IsRepo returns true if current folder is a git repository.
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe"
|
||||
"github.com/goreleaser/goreleaser/internal/semerrgroup"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
• foo foo=bar
|
||||
• bar foo=bar
|
||||
• foo foo=bar
|
||||
• bar foo=bar
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
• foo foo=bar
|
||||
• bar foo=bar
|
||||
• foo foo=bar
|
||||
• bar foo=bar
|
||||
|
||||
@@ -3,10 +3,10 @@ package logext
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/apex/log/handlers/cli"
|
||||
"github.com/caarlos0/log"
|
||||
)
|
||||
|
||||
// Output type of the log output.
|
||||
@@ -54,12 +54,17 @@ func (w logWriter) Write(p []byte) (int, error) {
|
||||
}
|
||||
|
||||
func newLogger(fields log.Fields) *log.Entry {
|
||||
handler := cli.New(cli.Default.Writer)
|
||||
handler.Padding = cli.Default.Padding + 3
|
||||
return (&log.Logger{
|
||||
Handler: handler,
|
||||
Level: log.InfoLevel,
|
||||
}).WithFields(fields)
|
||||
handler := log.New(currentWriter())
|
||||
handler.IncreasePadding()
|
||||
return handler.WithFields(fields)
|
||||
}
|
||||
|
||||
func currentWriter() io.Writer {
|
||||
logger, ok := log.Log.(*log.Logger)
|
||||
if !ok {
|
||||
return os.Stderr
|
||||
}
|
||||
return logger.Writer
|
||||
}
|
||||
|
||||
func isDebug() bool {
|
||||
|
||||
@@ -6,8 +6,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/apex/log/handlers/cli"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/golden"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -17,10 +16,10 @@ func TestWriter(t *testing.T) {
|
||||
for _, out := range []Output{Info, Error} {
|
||||
t.Run(strconv.Itoa(int(out)), func(t *testing.T) {
|
||||
t.Cleanup(func() {
|
||||
cli.Default.Writer = os.Stderr
|
||||
log.Log = log.New(os.Stderr)
|
||||
})
|
||||
var b bytes.Buffer
|
||||
cli.Default.Writer = &b
|
||||
log.Log = log.New(&b)
|
||||
l, err := NewWriter(log.Fields{"foo": "bar"}, out).Write([]byte("foo\nbar\n"))
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 8, l)
|
||||
@@ -33,12 +32,11 @@ func TestWriter(t *testing.T) {
|
||||
for _, out := range []Output{Info, Error} {
|
||||
t.Run(strconv.Itoa(int(out)), func(t *testing.T) {
|
||||
t.Cleanup(func() {
|
||||
cli.Default.Writer = os.Stderr
|
||||
log.SetLevel(log.InfoLevel)
|
||||
log.Log = log.New(os.Stderr)
|
||||
})
|
||||
log.SetLevel(log.DebugLevel)
|
||||
var b bytes.Buffer
|
||||
cli.Default.Writer = &b
|
||||
log.Log = log.New(&b)
|
||||
log.SetLevel(log.DebugLevel)
|
||||
l, err := NewWriter(log.Fields{"foo": "bar"}, out).Write([]byte("foo\nbar\n"))
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 8, l)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package errhandler
|
||||
|
||||
import (
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/middleware"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
|
||||
@@ -1,36 +1,33 @@
|
||||
package logging
|
||||
|
||||
import (
|
||||
"github.com/apex/log"
|
||||
"github.com/apex/log/handlers/cli"
|
||||
"github.com/fatih/color"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/goreleaser/goreleaser/internal/middleware"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
// Padding is a logging initial padding.
|
||||
type Padding int
|
||||
|
||||
// DefaultInitialPadding is the default padding in the log library.
|
||||
const DefaultInitialPadding Padding = 3
|
||||
|
||||
// ExtraPadding is the double of the DefaultInitialPadding.
|
||||
const ExtraPadding = DefaultInitialPadding * 2
|
||||
var bold = lipgloss.NewStyle().Bold(true)
|
||||
|
||||
// Log pretty prints the given action and its title.
|
||||
// You can have different padding levels by providing different initial
|
||||
// paddings. The middleware will print the title in the given padding and the
|
||||
// action logs in padding+default padding.
|
||||
// The default padding in the log library is 3.
|
||||
// The middleware always resets to the default padding.
|
||||
func Log(title string, next middleware.Action, padding Padding) middleware.Action {
|
||||
func Log(title string, next middleware.Action) middleware.Action {
|
||||
return func(ctx *context.Context) error {
|
||||
defer func() {
|
||||
cli.Default.Padding = int(DefaultInitialPadding)
|
||||
log.ResetPadding()
|
||||
}()
|
||||
cli.Default.Padding = int(padding)
|
||||
log.Infof(color.New(color.Bold).Sprint(title))
|
||||
cli.Default.Padding = int(padding + DefaultInitialPadding)
|
||||
log.Infof(bold.Render(title))
|
||||
log.IncreasePadding()
|
||||
return next(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
// PadLog pretty prints the given action and its title with an increased padding.
|
||||
func PadLog(title string, next middleware.Action) middleware.Action {
|
||||
return func(ctx *context.Context) error {
|
||||
defer log.ResetPadding()
|
||||
log.IncreasePadding()
|
||||
log.Infof(bold.Render(title))
|
||||
log.IncreasePadding()
|
||||
return next(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package logging
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -10,5 +11,10 @@ import (
|
||||
func TestLogging(t *testing.T) {
|
||||
require.NoError(t, Log("foo", func(ctx *context.Context) error {
|
||||
return nil
|
||||
}, DefaultInitialPadding)(nil))
|
||||
})(nil))
|
||||
|
||||
require.NoError(t, PadLog("foo", func(ctx *context.Context) error {
|
||||
log.Info("a")
|
||||
return nil
|
||||
})(nil))
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ package skip
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/middleware"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ package announce
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/middleware/errhandler"
|
||||
"github.com/goreleaser/goreleaser/internal/middleware/logging"
|
||||
"github.com/goreleaser/goreleaser/internal/middleware/skip"
|
||||
@@ -69,10 +69,9 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
for _, announcer := range announcers {
|
||||
if err := skip.Maybe(
|
||||
announcer,
|
||||
logging.Log(
|
||||
logging.PadLog(
|
||||
announcer.String(),
|
||||
errhandler.Handle(announcer.Announce),
|
||||
logging.ExtraPadding,
|
||||
),
|
||||
)(ctx); err != nil {
|
||||
return fmt.Errorf("%s: failed to announce release: %w", announcer.String(), err)
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/archivefiles"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/ids"
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/commitauthor"
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"io"
|
||||
"os/exec"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/go-shellwords"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/gio"
|
||||
"github.com/goreleaser/goreleaser/internal/logext"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/extrafiles"
|
||||
"github.com/goreleaser/goreleaser/internal/semerrgroup"
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/commitauthor"
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/go-shellwords"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/ids"
|
||||
"github.com/goreleaser/goreleaser/internal/semerrgroup"
|
||||
"github.com/goreleaser/goreleaser/internal/shell"
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/git"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/extrafiles"
|
||||
"github.com/goreleaser/goreleaser/internal/semerrgroup"
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/DisgoOrg/disgohook"
|
||||
"github.com/DisgoOrg/disgohook/api"
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
2
internal/pipe/dist/dist.go
vendored
2
internal/pipe/dist/dist.go
vendored
@@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"os/exec"
|
||||
"sync"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/gio"
|
||||
"github.com/goreleaser/goreleaser/internal/logext"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/deprecate"
|
||||
"github.com/goreleaser/goreleaser/internal/gio"
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe"
|
||||
"github.com/goreleaser/goreleaser/internal/testlib"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/ids"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe"
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/yaml"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
2
internal/pipe/env/env.go
vendored
2
internal/pipe/env/env.go
vendored
@@ -9,7 +9,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
homedir "github.com/mitchellh/go-homedir"
|
||||
|
||||
@@ -9,8 +9,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/apex/log"
|
||||
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/git"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/commitauthor"
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/commitauthor"
|
||||
|
||||
@@ -3,8 +3,8 @@ package linkedin
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package milestone
|
||||
|
||||
import (
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/git"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/deprecate"
|
||||
"github.com/goreleaser/goreleaser/internal/ids"
|
||||
|
||||
@@ -63,10 +63,9 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
for _, publisher := range publishers {
|
||||
if err := skip.Maybe(
|
||||
publisher,
|
||||
logging.Log(
|
||||
logging.PadLog(
|
||||
publisher.String(),
|
||||
errhandler.Handle(publisher.Publish),
|
||||
logging.ExtraPadding,
|
||||
),
|
||||
)(ctx); err != nil {
|
||||
return fmt.Errorf("%s: failed to publish artifacts: %w", publisher.String(), err)
|
||||
|
||||
@@ -3,9 +3,9 @@ package reddit
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/go-reddit/v3/reddit"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/extrafiles"
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/gio"
|
||||
"github.com/goreleaser/goreleaser/internal/ids"
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/commitauthor"
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/gio"
|
||||
"github.com/goreleaser/goreleaser/internal/ids"
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
"github.com/slack-go/slack"
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
gomail "gopkg.in/mail.v2"
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/gio"
|
||||
"github.com/goreleaser/goreleaser/internal/ids"
|
||||
|
||||
@@ -4,7 +4,7 @@ package snapshot
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ package sourcearchive
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/git"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
|
||||
@@ -3,9 +3,9 @@ package teams
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
goteamsnotify "github.com/atc0005/go-teams-notify/v2"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
@@ -3,8 +3,8 @@ package telegram
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
api "github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
|
||||
@@ -3,8 +3,8 @@ package twitter
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/dghubble/go-twitter/twitter"
|
||||
"github.com/dghubble/oauth1"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/go-shellwords"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/ids"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe"
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/tmpl"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
)
|
||||
|
||||
@@ -7,8 +7,7 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
|
||||
"github.com/caarlos0/log"
|
||||
"github.com/goreleaser/goreleaser/internal/gio"
|
||||
"github.com/goreleaser/goreleaser/internal/logext"
|
||||
"github.com/goreleaser/goreleaser/pkg/context"
|
||||
|
||||
Reference in New Issue
Block a user