sql-migrate
sql-migrate copied to clipboard
Package not with "go install" installable
Hi, I would like to use go install, but it didn't work.
$ go install github.com/rubenv/sql-migrate
go install: version is required when current directory is not in a module
Try 'go install github.com/rubenv/sql-migrate@latest' to install the latest version
I needed to use the provided command from the docs, but it shows warnings.
$ go get github.com/rubenv/sql-migrate/...
go get: installing executables with 'go get' in module mode is deprecated.
To adjust and download dependencies of the current module, use 'go get -d'.
To install using requirements of the current module, use 'go install'.
To install ignoring the current module, use 'go install' with a version,
like 'go install example.com/cmd@latest'.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
I guess the problem is that sql-migarte
doesn't have any releases. In go 1.17 when you use go install
to activate modules you just have to specify the version either latest
or commit hash.
Using the latest
version IMHO is not an option since on CI you are losing the ability to use a fixed version of the tool.
The better way is to issue a release i.e. v1.0.0
and let people use this version instead of latest
or confusing commit hash.
go install -v github.com/rubenv/sql-migrate/[email protected]
would be nice
Dear maintainers WDYT? @rubenv
I forgot to mention, using @latest did not work.
$ go install github.com/rubenv/sql-migrate@latest
package github.com/rubenv/sql-migrate is not a main package
Edit: I just tried with commit hash, the same issue.
$ go install github.com/rubenv/sql-migrate@9f02b1e13857b68b1357a8302c9b05ff6b70d6c0
package github.com/rubenv/sql-migrate is not a main package
Always resisted rolling a release until now cause it's extra work, but things are pretty much stable now.
I'll roll a release once I get a chance.
On Thu, Dec 23, 2021, 16:41 Nico Braun @.***> wrote:
I forgot to mention, using @latest https://github.com/latest did not work.
$ go install @.*** package github.com/rubenv/sql-migrate is not a main package
— Reply to this email directly, view it on GitHub https://github.com/rubenv/sql-migrate/issues/202#issuecomment-1000384570, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAKPGCFJ5H3LR3O4FWK26TUSM7MPANCNFSM5KMDOWTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
I forgot to mention, using @latest did not work.
$ go install github.com/rubenv/sql-migrate@latest package github.com/rubenv/sql-migrate is not a main package
The executable package is in github.com/rubenv/sql-migrate/sql-migrate
, so the path you were using was wrong.
I'll roll a release once I get a chance.
Just pushed v1.0.0
!
you can try :
go get -v github.com/rubenv/sql-migrate/...@f842348935589e4563be545226d465178bd439cf