mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 09:24:23 +00:00
Allow gorepomod to update plugin mod files
This commit is contained in:
@@ -36,7 +36,6 @@ var (
|
|||||||
"docs",
|
"docs",
|
||||||
"examples",
|
"examples",
|
||||||
"hack",
|
"hack",
|
||||||
"plugin",
|
|
||||||
"releasing",
|
"releasing",
|
||||||
"site",
|
"site",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ func (dg *DotGitData) AbsPath() string {
|
|||||||
|
|
||||||
// NewDotGitDataFromPath wants the incoming path to hold dotGit
|
// NewDotGitDataFromPath wants the incoming path to hold dotGit
|
||||||
// E.g.
|
// E.g.
|
||||||
|
//
|
||||||
// ~/gopath/src/sigs.k8s.io/kustomize
|
// ~/gopath/src/sigs.k8s.io/kustomize
|
||||||
// ~/gopath/src/github.com/monopole/gorepomod
|
// ~/gopath/src/github.com/monopole/gorepomod
|
||||||
func NewDotGitDataFromPath(path string) (*DotGitData, error) {
|
func NewDotGitDataFromPath(path string) (*DotGitData, error) {
|
||||||
@@ -126,7 +127,7 @@ func (dg *DotGitData) checkModules(modules []*protoModule) error {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Do the relative path and short name make sense?
|
// Do the relative path and short name make sense?
|
||||||
if !strings.HasSuffix(pm.PathToGoMod(), string(shortName)) {
|
if !strings.HasPrefix(string(shortName), "plugin/") && !strings.HasSuffix(pm.PathToGoMod(), string(shortName)) {
|
||||||
return fmt.Errorf(
|
return fmt.Errorf(
|
||||||
"in %q, the module name %q doesn't match the file's pathToGoMod %q",
|
"in %q, the module name %q doesn't match the file's pathToGoMod %q",
|
||||||
file, shortName, pm.PathToGoMod())
|
file, shortName, pm.PathToGoMod())
|
||||||
|
|||||||
Reference in New Issue
Block a user