@@ -499,6 +499,15 @@ func cherryPick(ctx context.Context, logger *logrus.Entry, c commit, commitArgs
499
499
withEnv (exec .CommandContext (ctx ,
500
500
"go" , "mod" , "verify" ,
501
501
), os .Environ ()... ),
502
+ withDir (withEnv (exec .CommandContext (ctx ,
503
+ "go" , "mod" , "tidy" ,
504
+ ), os .Environ ()... ), filepath .Join ("staging" , c .Repo )),
505
+ withDir (withEnv (exec .CommandContext (ctx ,
506
+ "go" , "mod" , "vendor" ,
507
+ ), os .Environ ()... ), filepath .Join ("staging" , c .Repo )),
508
+ withDir (withEnv (exec .CommandContext (ctx ,
509
+ "go" , "mod" , "verify" ,
510
+ ), os .Environ ()... ), filepath .Join ("staging" , c .Repo )),
502
511
withEnv (exec .CommandContext (ctx ,
503
512
"make" , "generate-manifests" ,
504
513
), os .Environ ()... ),
@@ -545,6 +554,11 @@ func withEnv(command *exec.Cmd, env ...string) *exec.Cmd {
545
554
return command
546
555
}
547
556
557
+ func withDir (command * exec.Cmd , dir string ) * exec.Cmd {
558
+ command .Dir = dir
559
+ return command
560
+ }
561
+
548
562
func getBody (commits []commit , assign []string ) string {
549
563
lines := []string {
550
564
"The staging/ and vendor/ directories have been synchronized from the upstream repositories, pulling in the following commits:" ,
0 commit comments