1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-11-06 09:09:29 +02:00

fix: nfpm deprecation on nfpm check (#3087)

closes #3067

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker
2022-05-08 21:13:56 -03:00
committed by GitHub
parent 4cf566be44
commit f812d1b920
5 changed files with 28 additions and 40 deletions

View File

@@ -3,6 +3,7 @@ package nfpm
import (
"fmt"
"io"
"os"
"path/filepath"
"strings"
@@ -54,10 +55,16 @@ func (Pipe) Default(ctx *context.Context) error {
if fpm.FileNameTemplate == "" {
fpm.FileNameTemplate = defaultNameTemplate
}
if len(fpm.EmptyFolders) > 0 {
deprecate.Notice(ctx, "nfpms.empty_folders")
}
if fpm.Maintainer == "" {
deprecate.Notice(ctx, "nfpms.maintainer")
}
ids.Inc(fpm.ID)
}
deprecation.Noticer = deprecate.NewWriter(ctx)
deprecation.Noticer = io.Discard
return ids.Validate()
}