-
-
Notifications
You must be signed in to change notification settings - Fork 12
Description
When using a go module that's defined in a subdirectory of a repository, Go expects the version tag to start with the path of the parent directory of the go.mod
file (reference). So for <repo>/foo/bar/go.mod
, Go would expect tags of the form foo/bar/v...
.
When Knope encounters a go.mod
file in a subdirectory, it should create a tag in this format (presumably in addition to the standard v...
) when tagging a release. It would probably be simplest to check whether the go.mod
is in a subdirectory relative to Knope.toml
(or pwd
if there isn't one), but the "right" approach would be to query git to find the repository root. (The CLI command is git rev-parse --show-toplevel
; hopefully git2
provides access to this functionality.) Conversely, when determining the current version of a go.mod
file, it should look for tags in this format and use them if present.
(Related to #207)