goreleaser / nfpm

nFPM is Not FPM - a simple deb, rpm, apk, ipk, and arch linux packager written in Go
https://nfpm.goreleaser.com/
MIT License
2.09k stars 154 forks source link

Has the minimum Go version (intentionally) changed? #820

Closed atc0005 closed 2 months ago

atc0005 commented 2 months ago

What happened?

Minimum Go version changed from 1.19 to 1.22 via:

This was surprising since Go 1.21 was set as the minimum Go version in this commit:

I would have expected Go 1.21 to be the minimum Go version.

The contributing doc notes that Go 1.19 and newer is supported:

How can we reproduce this?

If you attempt to install nfpm via go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.37.0 using Go 1.21 you get this error:

go: github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.37.0: github.com/goreleaser/nfpm/v2@v2.37.0 requires go >= 1.22 (running go 1.21.10; GOTOOLCHAIN=local)

nfpm version

v2.36.1 builds/installs successfully using Go 1.21
v2.37.0 fails to build

Build error:

> `go: github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.37.0: github.com/goreleaser/nfpm/v2@v2.37.0 requires go >= 1.22 (running go 1.21.10; GOTOOLCHAIN=local)`

Search

Code of Conduct

Additional context

If the minimum Go version change is intentional then the https://github.com/goreleaser/nfpm/blob/main/CONTRIBUTING.md doc probably needs updating to reflect that, in which case the fix is to update that file instead of reverting the minimum version listed in this project's go.mod file.

atc0005 commented 2 months ago

On a different note, many thanks for this tool!

caarlos0 commented 2 months ago

it wasn't intentional, no - must have slipped with some dep update... fixing!

thanks for letting me know 💜

caarlos0 commented 2 months ago

pushed new tag with the fixes, let me know if it works as expected now.

atc0005 commented 2 months ago

@caarlos0 That was fast!

nfpm v2.37.1 builds without issue using Go 1.21.

Thank you!