#8 new flag UpMajor.

This commit is contained in:
Gorbunov Kirill Andreevich
2024-03-17 15:41:25 +03:00
parent 3a60ffbf91
commit 974c685136
5 changed files with 84 additions and 14 deletions

View File

@@ -210,6 +210,11 @@ func (g *Gitea) RequestOpen(ctx context.Context, branch string, path string, mod
var cmd *exec.Cmd
var out []byte
cmd = exec.CommandContext(ctx, epath, "mod", "edit", fmt.Sprintf("-droprequire=%s", mod.Module.Path))
if out, err = cmd.CombinedOutput(); err != nil {
logger.Fatalf(ctx, "failed to run go mod edit: %s err: %v", out, err)
}
cmd = exec.CommandContext(ctx, epath, "mod", "edit", fmt.Sprintf("-require=%s@%s", path, mod.Version))
if out, err = cmd.CombinedOutput(); err != nil {
logger.Fatalf(ctx, "failed to run go mod edit: %s err: %v", out, err)