minamijoyo / tfupdate

Update version constraints in your Terraform configurations
MIT License
556 stars 23 forks source link

Compatibility with go install #69

Closed sodul closed 2 years ago

sodul commented 2 years ago

When trying to install with go install it fails with go 1.17. Ideally we should be able to easily install Go packages through the go install command.

> go install github.com/minamijoyo/tfupdate@latest
go install: github.com/minamijoyo/tfupdate@latest (in github.com/minamijoyo/tfupdate@v0.6.4):
    The go.mod file for the module providing named packages contains one or
    more replace directives. It must not contain directives that would cause
    it to be interpreted differently than if it were the main module.

This should only require minor changes to go.mod in oder to work.

I know there is a binary release for several platforms but not all platforms are provided and macOS security can get in the way of unsigned binaries:

image
minamijoyo commented 2 years ago

Hi @sodul, Thank you for reporting this!

Fixed in v0.6.5.

$ go install github.com/minamijoyo/tfupdate@latest
go: downloading github.com/minamijoyo/tfupdate v0.6.5
$ tfupdate -v
0.6.5
sodul commented 2 years ago

Confirmed on my side on an M1 MacBook Pro and Go 1.17.8. Thanks!