1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

feat(nfpm): compression, fields, and predends on debs (#4632)

refs #4630

<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

...

<!-- Why is this change being made? -->

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2024-02-19 08:51:36 -03:00 committed by GitHub
parent d9e9e82ca7
commit 42d2db2021
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 30 additions and 6 deletions

View File

@ -341,7 +341,9 @@ func create(ctx *context.Context, fpm config.NFPM, format string, artifacts []*a
PostRemove: overridden.Scripts.PostRemove,
},
Deb: nfpm.Deb{
// TODO: Compression, Fields
Compression: overridden.Deb.Compression,
Fields: overridden.Deb.Fields,
Predepends: overridden.Deb.Predepends,
Scripts: nfpm.DebScripts{
Rules: overridden.Deb.Scripts.Rules,
Templates: overridden.Deb.Scripts.Templates,

View File

@ -857,11 +857,14 @@ type NFPMDebSignature struct {
// NFPMDeb is custom configs that are only available on deb packages.
type NFPMDeb struct {
Scripts NFPMDebScripts `yaml:"scripts,omitempty" json:"scripts,omitempty"`
Triggers NFPMDebTriggers `yaml:"triggers,omitempty" json:"triggers,omitempty"`
Breaks []string `yaml:"breaks,omitempty" json:"breaks,omitempty"`
Signature NFPMDebSignature `yaml:"signature,omitempty" json:"signature,omitempty"`
Lintian []string `yaml:"lintian_overrides,omitempty" json:"lintian_overrides,omitempty"`
Scripts NFPMDebScripts `yaml:"scripts,omitempty" json:"scripts,omitempty"`
Triggers NFPMDebTriggers `yaml:"triggers,omitempty" json:"triggers,omitempty"`
Breaks []string `yaml:"breaks,omitempty" json:"breaks,omitempty"`
Signature NFPMDebSignature `yaml:"signature,omitempty" json:"signature,omitempty"`
Lintian []string `yaml:"lintian_overrides,omitempty" json:"lintian_overrides,omitempty"`
Compression string `yaml:"compression,omitempty" json:"compression,omitempty" jsonschema:"enum=gzip,enum=xz,enum=none,default=gzip"`
Fields map[string]string `yaml:"fields,omitempty" json:"fields,omitempty"`
Predepends []string `yaml:"predepends,omitempty" json:"predepends,omitempty"`
}
type NFPMAPKScripts struct {

View File

@ -392,6 +392,14 @@ nfpms:
breaks:
- some-package
# Packages which would break if this package would be installed.
# The installation of this package is blocked if `some-package`
# is already installed.
#
# Since: v1.25.
breaks:
- some-package
# The package is signed if a key_file is set
signature:
# PGP secret key file path (can also be ASCII-armored).
@ -407,6 +415,17 @@ nfpms:
# Default: 'origin'
type: origin
# Additional fields for the control file. Empty fields are ignored.
# This will expand any env vars you set in the field values, e.g. Vcs-Browser: ${CI_PROJECT_URL}
fields:
Bugs: https://github.com/goreleaser/nfpm/issues
# The Debian-specific "predepends" field can be used to ensure the complete installation of a list of
# packages (including unpacking, pre- and post installation scripts) prior to the installation of the
# built package.
predepends:
- baz (>= 1.2.3-0)
apk:
# APK specific scripts.
scripts: