Repository: goreleaser/nfpm
Pull request #268 (2020-12-23 00:36:25)

feat: version as v2
following #267, version as v2 now.

BREAKING CHANGE: changes import path to add a /v2 sufffix

vercel[bot]: This pull request is being automatically deployed with Vercel ([learn more](https://vercel.link/github-learn-more)).  
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: [https://vercel.com/goreleaser/nfpm/3u4gl9sxv](https://vercel.com/goreleaser/nfpm/3u4gl9sxv)  
✅ Preview: [https://nfpm-git-v2.goreleaser.vercel.app](https://nfpm-git-v2.goreleaser.vercel.app)


codecov[bot]: # [Codecov](https://codecov.io/gh/goreleaser/nfpm/pull/268?src=pr&el=h1) Report
> Merging [#268](https://codecov.io/gh/goreleaser/nfpm/pull/268?src=pr&el=desc) (5f568e6) into [master](https://codecov.io/gh/goreleaser/nfpm/commit/19817233b5afb0fcfca17c2429cda8bb7e7ec169?el=desc) (1981723) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/goreleaser/nfpm/pull/268/graphs/tree.svg?width=650&height=150&src=pr&token=9QKGIxn7wg)](https://codecov.io/gh/goreleaser/nfpm/pull/268?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #268   +/-   ##
=======================================
  Coverage   69.44%   69.44%           
=======================================
  Files           9        9           
  Lines        1103     1103           
=======================================
  Hits          766      766           
  Misses        209      209           
  Partials      128      128           
```


| [Impacted Files](https://codecov.io/gh/goreleaser/nfpm/pull/268?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [apk/apk.go](https://codecov.io/gh/goreleaser/nfpm/pull/268/diff?src=pr&el=tree#diff-YXBrL2Fway5nbw==) | `70.63% <ø> (ø)` | |
| [cmd/nfpm/main.go](https://codecov.io/gh/goreleaser/nfpm/pull/268/diff?src=pr&el=tree#diff-Y21kL25mcG0vbWFpbi5nbw==) | `0.00% <ø> (ø)` | |
| [deb/deb.go](https://codecov.io/gh/goreleaser/nfpm/pull/268/diff?src=pr&el=tree#diff-ZGViL2RlYi5nbw==) | `66.22% <ø> (ø)` | |
| [files/files.go](https://codecov.io/gh/goreleaser/nfpm/pull/268/diff?src=pr&el=tree#diff-ZmlsZXMvZmlsZXMuZ28=) | `92.95% <ø> (ø)` | |
| [internal/sign/pgp.go](https://codecov.io/gh/goreleaser/nfpm/pull/268/diff?src=pr&el=tree#diff-aW50ZXJuYWwvc2lnbi9wZ3AuZ28=) | `75.75% <ø> (ø)` | |
| [nfpm.go](https://codecov.io/gh/goreleaser/nfpm/pull/268/diff?src=pr&el=tree#diff-bmZwbS5nbw==) | `79.59% <ø> (ø)` | |
| [rpm/rpm.go](https://codecov.io/gh/goreleaser/nfpm/pull/268/diff?src=pr&el=tree#diff-cnBtL3JwbS5nbw==) | `73.86% <ø> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/goreleaser/nfpm/pull/268?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/goreleaser/nfpm/pull/268?src=pr&el=footer). Last update [1981723...5f568e6](https://codecov.io/gh/goreleaser/nfpm/pull/268?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/.golangci.yml b/.golangci.yml
index c6bc339..a1bb92c 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -23,7 +23,7 @@ linters-settings:
   goimports:
     # put imports beginning with prefix after 3rd-party packages;
     # it's a comma-separated list of prefixes
-    local-prefixes: github.com/goreleaser/nfpm
+    local-prefixes: github.com/goreleaser/nfpm/v2
   govet:
     check-shadowing: true
   errcheck:
diff --git a/README.md b/README.md
index b197c05..0b5cf85 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
     <a href="https://github.com/goreleaser/nfpm/actions?workflow=build"><img alt="GitHub Actions" src="https://img.shields.io/github/workflow/status/goreleaser/nfpm/build?style=for-the-badge"></a>
     <a href="https://codecov.io/gh/goreleaser/nfpm"><img alt="Codecov branch" src="https://img.shields.io/codecov/c/github/goreleaser/nfpm/master.svg?style=for-the-badge"></a>
     <a href="https://goreportcard.com/report/github.com/goreleaser/nfpm"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/goreleaser/nfpm?style=for-the-badge"></a>
-    <a href="http://godoc.org/github.com/goreleaser/nfpm"><img alt="Go Doc" src="https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge"></a>
+    <a href="http://godoc.org/github.com/goreleaser/nfpm/v2"><img alt="Go Doc" src="https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge"></a>
     <a href="https://github.com/goreleaser"><img alt="Powered By: GoReleaser" src="https://img.shields.io/badge/powered%20by-goreleaser-green.svg?style=for-the-badge"></a>
   </p>
 </p>
diff --git a/apk/apk.go b/apk/apk.go
index 43b755b..5ecd36f 100644
--- a/apk/apk.go
+++ b/apk/apk.go
@@ -47,9 +47,9 @@ import (
 	"text/template"
 	"time"
 
-	"github.com/goreleaser/nfpm"
-	"github.com/goreleaser/nfpm/files"
-	"github.com/goreleaser/nfpm/internal/sign"
+	"github.com/goreleaser/nfpm/v2"
+	"github.com/goreleaser/nfpm/v2/files"
+	"github.com/goreleaser/nfpm/v2/internal/sign"
 )
 
 const packagerName = "apk"
diff --git a/cmd/nfpm/main.go b/cmd/nfpm/main.go
index c67bd3a..7eea961 100644
--- a/cmd/nfpm/main.go
+++ b/cmd/nfpm/main.go
@@ -11,10 +11,10 @@ import (
 
 	"github.com/alecthomas/kingpin"
 
-	"github.com/goreleaser/nfpm"
-	_ "github.com/goreleaser/nfpm/apk"
-	_ "github.com/goreleaser/nfpm/deb"
-	_ "github.com/goreleaser/nfpm/rpm"
+	"github.com/goreleaser/nfpm/v2"
+	_ "github.com/goreleaser/nfpm/v2/apk"
+	_ "github.com/goreleaser/nfpm/v2/deb"
+	_ "github.com/goreleaser/nfpm/v2/rpm"
 )
 
 // nolint: gochecknoglobals
diff --git a/deb/deb.go b/deb/deb.go
index 5fff431..446f5d9 100644
--- a/deb/deb.go
+++ b/deb/deb.go
@@ -20,9 +20,9 @@ import (
 	"github.com/blakesmith/ar"
 	"github.com/goreleaser/chglog"
 
-	"github.com/goreleaser/nfpm"
-	"github.com/goreleaser/nfpm/files"
-	"github.com/goreleaser/nfpm/internal/sign"
+	"github.com/goreleaser/nfpm/v2"
+	"github.com/goreleaser/nfpm/v2/files"
+	"github.com/goreleaser/nfpm/v2/internal/sign"
 )
 
 const packagerName = "deb"
diff --git a/files/files.go b/files/files.go
index 7655a54..ab1b366 100644
--- a/files/files.go
+++ b/files/files.go
@@ -10,7 +10,7 @@ import (
 	"github.com/goreleaser/fileglob"
 	"gopkg.in/yaml.v3"
 
-	"github.com/goreleaser/nfpm/internal/glob"
+	"github.com/goreleaser/nfpm/v2/internal/glob"
 )
 
 // Content describes the source and destination
diff --git a/go.mod b/go.mod
index 64f925a..adfde44 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/goreleaser/nfpm
+module github.com/goreleaser/nfpm/v2
 
 go 1.15
 
diff --git a/internal/sign/pgp.go b/internal/sign/pgp.go
index f3fafd1..353ab72 100644
--- a/internal/sign/pgp.go
+++ b/internal/sign/pgp.go
@@ -10,7 +10,7 @@ import (
 
 	"golang.org/x/crypto/openpgp"
 
-	"github.com/goreleaser/nfpm"
+	"github.com/goreleaser/nfpm/v2"
 )
 
 // PGPSigner returns a PGP signer that creates a detached non-ASCII-armored
diff --git a/nfpm.go b/nfpm.go
index fcf88a9..23eb88d 100644
--- a/nfpm.go
+++ b/nfpm.go
@@ -15,7 +15,7 @@ import (
 	"github.com/imdario/mergo"
 	"gopkg.in/yaml.v3"
 
-	"github.com/goreleaser/nfpm/files"
+	"github.com/goreleaser/nfpm/v2/files"
 )
 
 // nolint: gochecknoglobals
diff --git a/rpm/rpm.go b/rpm/rpm.go
index fa694de..6fafa65 100644
--- a/rpm/rpm.go
+++ b/rpm/rpm.go
@@ -15,12 +15,12 @@ import (
 	"github.com/google/rpmpack"
 	"github.com/sassoftware/go-rpmutils/cpio"
 
-	"github.com/goreleaser/nfpm/files"
-	"github.com/goreleaser/nfpm/internal/sign"
+	"github.com/goreleaser/nfpm/v2/files"
+	"github.com/goreleaser/nfpm/v2/internal/sign"
 
 	"github.com/goreleaser/chglog"
 
-	"github.com/goreleaser/nfpm"
+	"github.com/goreleaser/nfpm/v2"
 )
 
 const (
diff --git a/www/docs/usage.md b/www/docs/usage.md
index 6396767..03a55f2 100644
--- a/www/docs/usage.md
+++ b/www/docs/usage.md
@@ -22,6 +22,6 @@ created package: /tmp/foo-1.0.0.x86_64.rpm
 
 ## Go Library
 
-Check the [GoDocs](https://pkg.go.dev/github.com/goreleaser/nfpm?tab=doc) page,
+Check the [GoDocs](https://pkg.go.dev/github.com/goreleaser/nfpm/v2?tab=doc) page,
 as well as [NFPM command line implementation](https://github.com/goreleaser/nfpm/blob/master/cmd/nfpm/main.go)
 and [GoReleaser's usage](https://github.com/goreleaser/goreleaser/blob/master/internal/pipe/nfpm/nfpm.go).


Test patch:
diff --git a/acceptance_test.go b/acceptance_test.go
index 3ce0aa5..54202c7 100644
--- a/acceptance_test.go
+++ b/acceptance_test.go
@@ -11,10 +11,10 @@ import (
 
 	"github.com/stretchr/testify/require"
 
-	"github.com/goreleaser/nfpm"
-	_ "github.com/goreleaser/nfpm/apk"
-	_ "github.com/goreleaser/nfpm/deb"
-	_ "github.com/goreleaser/nfpm/rpm"
+	"github.com/goreleaser/nfpm/v2"
+	_ "github.com/goreleaser/nfpm/v2/apk"
+	_ "github.com/goreleaser/nfpm/v2/deb"
+	_ "github.com/goreleaser/nfpm/v2/rpm"
 )
 
 // nolint: gochecknoglobals
diff --git a/apk/apk_test.go b/apk/apk_test.go
index 6216085..8dc2792 100644
--- a/apk/apk_test.go
+++ b/apk/apk_test.go
@@ -16,9 +16,9 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/goreleaser/nfpm"
-	"github.com/goreleaser/nfpm/files"
-	"github.com/goreleaser/nfpm/internal/sign"
+	"github.com/goreleaser/nfpm/v2"
+	"github.com/goreleaser/nfpm/v2/files"
+	"github.com/goreleaser/nfpm/v2/internal/sign"
 )
 
 // nolint: gochecknoglobals
diff --git a/deb/deb_test.go b/deb/deb_test.go
index 5ec0ea3..f1c88dd 100644
--- a/deb/deb_test.go
+++ b/deb/deb_test.go
@@ -23,9 +23,9 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/goreleaser/nfpm"
-	"github.com/goreleaser/nfpm/files"
-	"github.com/goreleaser/nfpm/internal/sign"
+	"github.com/goreleaser/nfpm/v2"
+	"github.com/goreleaser/nfpm/v2/files"
+	"github.com/goreleaser/nfpm/v2/internal/sign"
 )
 
 // nolint: gochecknoglobals
diff --git a/files/files_test.go b/files/files_test.go
index 652e402..b25af90 100644
--- a/files/files_test.go
+++ b/files/files_test.go
@@ -9,7 +9,7 @@ import (
 	"github.com/stretchr/testify/require"
 	"gopkg.in/yaml.v3"
 
-	"github.com/goreleaser/nfpm/files"
+	"github.com/goreleaser/nfpm/v2/files"
 )
 
 type testStruct struct {
diff --git a/internal/sign/pgp_test.go b/internal/sign/pgp_test.go
index 2b4eacd..7f669fb 100644
--- a/internal/sign/pgp_test.go
+++ b/internal/sign/pgp_test.go
@@ -10,7 +10,7 @@ import (
 	"github.com/stretchr/testify/require"
 	"golang.org/x/crypto/openpgp"
 
-	"github.com/goreleaser/nfpm"
+	"github.com/goreleaser/nfpm/v2"
 )
 
 const pass = "hunter2"
diff --git a/nfpm_test.go b/nfpm_test.go
index 768701b..d41486e 100644
--- a/nfpm_test.go
+++ b/nfpm_test.go
@@ -10,8 +10,8 @@ import (
 
 	"github.com/stretchr/testify/require"
 
-	"github.com/goreleaser/nfpm"
-	"github.com/goreleaser/nfpm/files"
+	"github.com/goreleaser/nfpm/v2"
+	"github.com/goreleaser/nfpm/v2/files"
 )
 
 func TestRegister(t *testing.T) {
diff --git a/rpm/rpm_test.go b/rpm/rpm_test.go
index 9676ea3..abed6b7 100644
--- a/rpm/rpm_test.go
+++ b/rpm/rpm_test.go
@@ -20,8 +20,8 @@ import (
 	"github.com/stretchr/testify/require"
 	"golang.org/x/crypto/openpgp"
 
-	"github.com/goreleaser/nfpm"
-	"github.com/goreleaser/nfpm/files"
+	"github.com/goreleaser/nfpm/v2"
+	"github.com/goreleaser/nfpm/v2/files"
 )
 
 func exampleInfo() *nfpm.Info {