mirror of
https://github.com/goreleaser/goreleaser.git
synced 2024-12-29 01:44:39 +02:00
fix: improve deprecate logs (#2841)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
parent
629723dd6b
commit
8db78f68a2
@ -43,10 +43,14 @@ 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
|
||||
cli.Default.Padding += 3
|
||||
defer func() {
|
||||
cli.Default.Padding -= 3
|
||||
}()
|
||||
// XXX: this is very ugly!
|
||||
w := log.Log.(*log.Logger).Handler.(*cli.Handler).Writer
|
||||
handler := cli.New(w)
|
||||
handler.Padding = cli.Default.Padding + 3
|
||||
log := &log.Logger{
|
||||
Handler: handler,
|
||||
Level: log.InfoLevel,
|
||||
}
|
||||
// replaces . and _ with -
|
||||
url := baseURL + strings.NewReplacer(
|
||||
".", "",
|
||||
|
@ -1,3 +1,3 @@
|
||||
• first
|
||||
• DEPRECATED: `foo.bar.whatever` should not be used anymore, check https://goreleaser.com/deprecations#foobarwhatever for more info
|
||||
• DEPRECATED: `foo.bar.whatever` should not be used anymore, check https://goreleaser.com/deprecations#foobarwhatever for more info
|
||||
• last
|
||||
|
@ -1,3 +1,3 @@
|
||||
• first
|
||||
• DEPRECATED: some custom template with a url https://goreleaser.com/deprecations#something-else
|
||||
• DEPRECATED: some custom template with a url https://goreleaser.com/deprecations#something-else
|
||||
• last
|
||||
|
Loading…
Reference in New Issue
Block a user