Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update how we handle mod replacements #6704

Merged
merged 1 commit into from Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/gapicgen/generator/gapics.go
Expand Up @@ -245,6 +245,7 @@ func (g *GapicGenerator) addModReplaceGenproto(dir string) error {
set -ex

go mod edit -replace "google.golang.org/genproto=$GENPROTO_DIR"
go mod tidy
`)
c.Dir = dir
c.Env = []string{
Expand All @@ -262,7 +263,8 @@ func (g *GapicGenerator) dropModReplaceGenproto(dir string) error {
c := execv.Command("bash", "-c", `
set -ex

go mod edit -dropreplace "google.golang.org/genproto"
git restore go.mod
git restore go.sum
`)
c.Dir = dir
c.Env = []string{
Expand Down