mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
feat: nfpm: suggests and recommends (#568)
refs https://github.com/goreleaser/nfpm/pull/5
This commit is contained in:
parent
d4c962dd7a
commit
d8fe6462d4
@ -66,6 +66,8 @@ nfpm:
|
||||
- rpm
|
||||
dependencies:
|
||||
- git
|
||||
recommends:
|
||||
- rpm
|
||||
snapcraft:
|
||||
name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
||||
summary: Deliver Go binaries as fast and easily as possible
|
||||
|
8
Gopkg.lock
generated
8
Gopkg.lock
generated
@ -75,8 +75,8 @@
|
||||
"deb",
|
||||
"rpm"
|
||||
]
|
||||
revision = "4f995bd813a38e5271ee1c5287309637fb98bc74"
|
||||
version = "v0.4.1"
|
||||
revision = "8bb63d15b72e7846d6bc550f1839d21da716978c"
|
||||
version = "v0.5.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/masterminds/semver"
|
||||
@ -142,7 +142,7 @@
|
||||
"context",
|
||||
"context/ctxhttp"
|
||||
]
|
||||
revision = "136a25c244d3019482a795d728110278d6ba09a4"
|
||||
revision = "cbe0f9307d0156177f9dd5dc85da1a31abc5f2fb"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
@ -188,6 +188,6 @@
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "12fbbded2568c173b0a125ed5fd89c7ce2782586910277eb29d64efc8f7749f7"
|
||||
inputs-digest = "380c1fe14a422668b4ec2370927eb9996d007fc61d8f52245d78c8b44533664b"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
|
@ -54,4 +54,4 @@
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/goreleaser/nfpm"
|
||||
version = "~0.4.0"
|
||||
version = "~0.5.0"
|
||||
|
@ -123,6 +123,8 @@ type FPM struct {
|
||||
|
||||
Formats []string `yaml:",omitempty"`
|
||||
Dependencies []string `yaml:",omitempty"`
|
||||
Recommends []string `yaml:",omitempty"`
|
||||
Suggests []string `yaml:",omitempty"`
|
||||
Conflicts []string `yaml:",omitempty"`
|
||||
Vendor string `yaml:",omitempty"`
|
||||
Homepage string `yaml:",omitempty"`
|
||||
|
@ -1,17 +1,12 @@
|
||||
---
|
||||
title: FPM and nFPM
|
||||
title: NFPM
|
||||
---
|
||||
|
||||
GoReleaser can be wired to [nfpm](https://github.com/goreleaser/nfpm) and
|
||||
[fpm](https://github.com/jordansissel/fpm) to generate `.deb` and `.rpm`
|
||||
archives.
|
||||
|
||||
FPM support will be removed soon, and if everything goes well only
|
||||
nFPM will be supported in future version of GoReleaser.
|
||||
GoReleaser can be wired to [nfpm](https://github.com/goreleaser/nfpm) to
|
||||
generate and publish `.deb` and `.rpm` packages.
|
||||
|
||||
```yml
|
||||
# .goreleaser.yml
|
||||
# change the key to fpm if you want to use fpm instead of nfpm
|
||||
nfpm:
|
||||
# You can change the name of the package.
|
||||
# This is parsed with the Go template engine and the following variables
|
||||
@ -65,6 +60,16 @@ nfpm:
|
||||
- git
|
||||
- zsh
|
||||
|
||||
# Packages your package recommends installing.
|
||||
recommends:
|
||||
- bzr
|
||||
- gtk
|
||||
|
||||
# Packages your package suggests installing.
|
||||
suggests:
|
||||
- cvs
|
||||
- ksh
|
||||
|
||||
# Packages that conflict with your package.
|
||||
conflicts:
|
||||
- svn
|
||||
@ -80,7 +85,6 @@ nfpm:
|
||||
"scripts/etc/init.d/": "/etc/init.d"
|
||||
```
|
||||
|
||||
Note that GoReleaser will not install `fpm`, `rpmbuild` or any of their
|
||||
dependencies for you. `nfpm` is used as a lib, so it is included in
|
||||
GoReleaser binaries, but you still need to install `rpmbuild` to generate
|
||||
RPM packages.
|
||||
Note that GoReleaser will not install `rpmbuild` or any dependencies for you.
|
||||
As for now, `rpmbuild` is recommended if you want to generate rpm packages.
|
||||
You can install it with `apt-get install rpm` or `brew install rpm`.
|
||||
|
@ -105,6 +105,8 @@ func create(ctx *context.Context, format, arch string, binaries []artifact.Artif
|
||||
Platform: "linux",
|
||||
Conflicts: ctx.Config.NFPM.Conflicts,
|
||||
Depends: ctx.Config.NFPM.Dependencies,
|
||||
Recommends: ctx.Config.NFPM.Recommends,
|
||||
Suggests: ctx.Config.NFPM.Suggests,
|
||||
Name: ctx.Config.ProjectName,
|
||||
Version: ctx.Version,
|
||||
Section: "",
|
||||
|
@ -67,6 +67,8 @@ func TestRunPipe(t *testing.T) {
|
||||
NameTemplate: defaultNameTemplate,
|
||||
Formats: []string{"deb", "rpm"},
|
||||
Dependencies: []string{"make"},
|
||||
Recommends: []string{"svn"},
|
||||
Suggests: []string{"bzr"},
|
||||
Conflicts: []string{"git"},
|
||||
Description: "Some description",
|
||||
License: "MIT",
|
||||
|
Loading…
x
Reference in New Issue
Block a user