mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-24 04:16:27 +02:00
parent
42fe5761f7
commit
d3fe7c3f33
@ -137,6 +137,15 @@ type NFPM struct {
|
||||
Bindir string `yaml:",omitempty"`
|
||||
Files map[string]string `yaml:",omitempty"`
|
||||
ConfigFiles map[string]string `yaml:"config_files,omitempty"`
|
||||
Scripts NFPMScripts `yaml:"scripts,omitempty"`
|
||||
}
|
||||
|
||||
// NFPMScripts is used to specify maintainer scripts
|
||||
type NFPMScripts struct {
|
||||
PreInstall string `yaml:"preinstall,omitempty"`
|
||||
PostInstall string `yaml:"postinstall,omitempty"`
|
||||
PreRemove string `yaml:"preremove,omitempty"`
|
||||
PostRemove string `yaml:"postremove,omitempty"`
|
||||
}
|
||||
|
||||
// Sign config
|
||||
|
@ -119,6 +119,12 @@ func create(ctx *context.Context, format, arch string, binaries []artifact.Artif
|
||||
Bindir: ctx.Config.NFPM.Bindir,
|
||||
Files: files,
|
||||
ConfigFiles: ctx.Config.NFPM.ConfigFiles,
|
||||
Scripts: nfpm.Scripts{
|
||||
PreInstall: ctx.Config.NFPM.Scripts.PreInstall,
|
||||
PostInstall: ctx.Config.NFPM.Scripts.PostInstall,
|
||||
PreRemove: ctx.Config.NFPM.Scripts.PreRemove,
|
||||
PostRemove: ctx.Config.NFPM.Scripts.PostRemove,
|
||||
},
|
||||
}
|
||||
|
||||
if err = nfpm.Validate(info); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user