1
0
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:
Carlos Alexandro Becker
2022-06-21 21:11:15 -03:00
committed by GitHub
parent dd66aac903
commit fe7e2123bd
79 changed files with 191 additions and 218 deletions

View File

@@ -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)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"os"
"github.com/apex/log"
"github.com/caarlos0/log"
"github.com/goreleaser/goreleaser/pkg/context"
)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -7,7 +7,7 @@ import (
"path/filepath"
"time"
"github.com/apex/log"
"github.com/caarlos0/log"
"github.com/goreleaser/goreleaser/pkg/context"
)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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)

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"
)