mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 10:00:56 +00:00
Merge pull request #5026 from KnVerey/update_releasing_instr
Update releasing workflow
This commit is contained in:
@@ -36,7 +36,6 @@ var (
|
||||
"docs",
|
||||
"examples",
|
||||
"hack",
|
||||
"plugin",
|
||||
"releasing",
|
||||
"site",
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func (e *Editor) run(args ...string) error {
|
||||
if e.doIt {
|
||||
out, err := c.CombinedOutput()
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s out=%q", err.Error(), out)
|
||||
return fmt.Errorf("failed to run go mod command in %s: %w (stdout=%q)", e.module.ShortName(), err, out)
|
||||
}
|
||||
} else {
|
||||
fmt.Printf("in %-60s; %s\n", c.Dir, c.String())
|
||||
@@ -57,6 +57,8 @@ func (e *Editor) Tidy() error {
|
||||
func (e *Editor) Pin(target misc.LaModule, oldV, newV semver.SemVer) error {
|
||||
err := e.run(
|
||||
"edit",
|
||||
"-dropreplace="+target.ImportPath(),
|
||||
"-dropreplace="+target.ImportPath()+"@"+oldV.String(),
|
||||
"-require="+target.ImportPath()+"@"+newV.String(),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -45,8 +45,9 @@ func (dg *DotGitData) AbsPath() string {
|
||||
|
||||
// NewDotGitDataFromPath wants the incoming path to hold dotGit
|
||||
// E.g.
|
||||
// ~/gopath/src/sigs.k8s.io/kustomize
|
||||
// ~/gopath/src/github.com/monopole/gorepomod
|
||||
//
|
||||
// ~/gopath/src/sigs.k8s.io/kustomize
|
||||
// ~/gopath/src/github.com/monopole/gorepomod
|
||||
func NewDotGitDataFromPath(path string) (*DotGitData, error) {
|
||||
if !utils.DirExists(filepath.Join(path, dotGitFileName)) {
|
||||
return nil, fmt.Errorf(
|
||||
@@ -126,7 +127,7 @@ func (dg *DotGitData) checkModules(modules []*protoModule) error {
|
||||
}
|
||||
} else {
|
||||
// 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(
|
||||
"in %q, the module name %q doesn't match the file's pathToGoMod %q",
|
||||
file, shortName, pm.PathToGoMod())
|
||||
|
||||
Reference in New Issue
Block a user