Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository not set up correctly for Go major versioning #350

Open
seanamos opened this issue May 14, 2024 · 0 comments
Open

Repository not set up correctly for Go major versioning #350

seanamos opened this issue May 14, 2024 · 0 comments

Comments

@seanamos
Copy link

Since v2, the repository does not work correctly with the Go SDK as it has not been set up correctly to deal with major versions:
https://go.dev/doc/modules/major-version

Command to reproduce

➜ go run github.com/OctopusDeploy/cli/cmd/octopus@latest version
1.7.1

➜ go run github.com/OctopusDeploy/cli/cmd/[email protected] version
go: github.com/OctopusDeploy/cli/cmd/[email protected]: github.com/OctopusDeploy/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/OctopusDeploy/cli/v2")

➜ go run github.com/OctopusDeploy/cli/v2/cmd/[email protected] version
go: github.com/OctopusDeploy/cli/v2/cmd/[email protected]: github.com/OctopusDeploy/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/OctopusDeploy/cli/v2")

As you can see, whether using go install or go run, there is no way to run a newer version than v1.7.1 as the go module/versioning systems requires v2 in the import paths: github.com/OctopusDeploy/cli/v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant