1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-27 13:06:12 +02:00
nfpm/www/docs/install.md
Carlos Alexandro Becker d10300d9e4
docs: fix go install
refs #343
2021-06-09 15:19:14 -03:00

1.7 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 (official):

brew install goreleaser/tap/nfpm

homebrew (may not be the latest version):

brew install nfpm

scoop:

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

deb/rpm/apk:

Download the .deb, .rpm or .apk from the releases page and install them with the appropriate tools.

shell script:

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

go install:

go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest

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 package \
	--config /tmp/pkg/foo.yml \
	--target /tmp \
	--packager deb

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 mod tidy

build:

go build -o nfpm ./cmd/nfpm

verify it works:

./nfpm --version