Skip to content

Commit

Permalink
feat(nfpm): add nfpm release config (#1363)
Browse files Browse the repository at this point in the history
add config.NFPM.Release  to set  nfpm release
  • Loading branch information
dotwoo committed Feb 26, 2020
1 parent 57be451 commit d03c0aa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions internal/pipe/nfpm/nfpm.go
Expand Up @@ -151,6 +151,7 @@ func create(ctx *context.Context, fpm config.NFPM, format, arch string, binaries
Section: "",
Priority: "",
Epoch: fpm.Epoch,
Release: fpm.Release,
Maintainer: fpm.Maintainer,
Description: fpm.Description,
Vendor: fpm.Vendor,
Expand Down
1 change: 1 addition & 0 deletions pkg/config/config.go
Expand Up @@ -224,6 +224,7 @@ type NFPMOverridables struct {
PackageName string `yaml:"package_name,omitempty"`
NameTemplate string `yaml:"name_template,omitempty"` // deprecated
Epoch string `yaml:"epoch,omitempty"`
Release string `yaml:"release,omitempty"`
Replacements map[string]string `yaml:",omitempty"`
Dependencies []string `yaml:",omitempty"`
Recommends []string `yaml:",omitempty"`
Expand Down
14 changes: 9 additions & 5 deletions www/content/nfpm.md
Expand Up @@ -15,7 +15,7 @@ Available options:
nfpms:
# note that this is an array of nfpm configs
-
# ID of the nfpm config, must be unique.
# ID of the nfpm config, must be unique.
# Defaults to "default".
id: foo

Expand All @@ -30,8 +30,8 @@ nfpms:
# Build IDs for the builds you want to create NFPM packages for.
# Defaults to all builds.
builds:
- foo
- bar
- foo
- bar

# Replacements for GOOS and GOARCH in the package name.
# Keys should be valid GOOSs or GOARCHs.
Expand Down Expand Up @@ -94,11 +94,15 @@ nfpms:
# Defaults to empty.
epoch: 1

# Package release.
# Defaults to empty.
release: 1

# Empty folders that should be created and managed by the packager
# implementation.
# Default is empty.
empty_folders:
- /var/log/foobar
- /var/log/foobar

# Files to add to your package (beyond the binary).
# Keys are source paths/globs to get the files from.
Expand Down Expand Up @@ -138,7 +142,7 @@ nfpms:
recommends:
- tig
empty_folders:
- /var/log/bar
- /var/log/bar
rpm:
replacements:
amd64: x86_64
Expand Down

0 comments on commit d03c0aa

Please sign in to comment.