go-semantic-release / semantic-release

📦🚀 semantic-release written in Go
https://go-semantic-release.xyz
MIT License
409 stars 43 forks source link

semantic-release V2 has incompatible structure for import through go.mod #82

Closed SergiiShapoval closed 4 years ago

SergiiShapoval commented 4 years ago

the current repo can be used in golang projects with import through go.mod (see https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module)

but if we import the V2 version we receive the next error from go:

go: errors parsing go.mod: /home/sergii/IdeaProjects/some_project/go.mod:7: require github.com/go-semantic-release/semantic-release: version "v2.6.0" invalid: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

It can be fixed following https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

will be great to be able to use this repo in golang projects without installing binaries

christophwitzko commented 4 years ago

To import v2 you would need to import github.com/go-semantic-release/semantic-release/v2 (like here: https://github.com/go-semantic-release/provider-github/blob/master/pkg/provider/github.go#L12)

SergiiShapoval commented 4 years ago

hm, yep mistyped, thank you for help