-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enforce packager defaults #372
feat: enforce packager defaults #372
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/goreleaser/nfpm/5Xqapkk4Eqeb2RXewToANHxxQH61 |
My preferred way would be this: Set a bogus value but print out a "deprecation" warning. Don't document the bogus value but document that leaving is empty is "deprecated". After a while (or with Maybe another word would fit this purpose better than "deprecation", though. What do you you think? |
@erikgeiser , that would work from my end! I will update the PR |
A safe value for the priority would be Oh by the way, maybe the bogus value should be |
deb/deb.go
Outdated
@@ -167,7 +167,8 @@ func (*Deb) SetPackagerDefaults(info *nfpm.Info) { | |||
// if in the long run we should be more strict about this and error when | |||
// not set? | |||
if info.Maintainer == "" { | |||
info.Maintainer = "unset maintainer unset@example.com" | |||
log.Println("DEPRECATION WARNING: Unset 'maintainer' field on deb packages is deprecated and will be removed in a future version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That kind of makes it sound like the maintainer field will be removed. What about DEPRECATION WARNING: Leaving the 'maintainer' field unset will not be allowed in a future version
. Same in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good call, adjusting now. Ty for the thoughtful feedback on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
thanks!
Codecov Report
@@ Coverage Diff @@
## master #372 +/- ##
==========================================
+ Coverage 65.03% 65.19% +0.16%
==========================================
Files 14 14
Lines 1284 1290 +6
==========================================
+ Hits 835 841 +6
Misses 313 313
Partials 136 136
Continue to review full report at Codecov.
|
Not completely addressing #100, but giving it a first go!
This PR adds in some
deb
specific defaults, specifically around:Would love any feedback/suggestions around making this better.
One thing I'm a little torn on is setting the
Maintainer
field to a bogus value. Even though this field is marked as mandatory in some of the deb documentation, but I would hate to break existing setups by making nfpm for real require it, instead of just setting a bogus value.When (or if 🤣) you're cool with the implementation details, I'll be happy to extend this to rpm/apk too. Thanks!!