1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-06-06 23:06:24 +02:00
nfpm/www/docs/install.md
Carlos Alexandro Becker 7b7ab3ffc7
docs: added docs website (#142)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-05-24 16:09:47 -03:00

1.6 KiB

Install

You can install the pre-compiled binary (in several different ways), use Docker or compile from source.

Here are the steps for each of them:

Install the pre-compiled binary

homebrew tap (only on macOS for now):

$ brew install goreleaser/tap/nfpm

scoop:

$ scoop bucket add goreleaser https://github.com/goreleaser/scoop-bucket.git
$ scoop install nfpm

deb/rpm:

Download the .deb or .rpm from the releases page and install with dpkg -i and rpm -i respectively.

Shell script:

$ curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh

manually:

Download the pre-compiled binaries from the releases page and copy to the desired location.

Running with Docker

You can also use it within a Docker container. To do that, you'll need to execute something more-or-less like the following:

$ docker run --rm \
  -v $PWD:/tmp/pkg \
  goreleaser/nfpm pkg --config /tmp/pkg/foo.yml --target /tmp/pkg/foo.rpm

Compiling from source

Here you have two options:

If you want to contribute to the project, please follow the steps on our contributing guide.

If you just want to build from source for whatever reason, follow these steps:

Clone:

$ git clone https://github.com/goreleaser/nfpm
$ cd nfpm

Get the dependencies:

$ go get ./...

Build:

$ go build -o nfpm .

Verify it works:

$ ./nfpm --version