Skip to content

Commit

Permalink
Remove go.mod and go.sum in post-processing before regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
kfcampbell committed Nov 14, 2023
1 parent 5833dc6 commit b2eb5e3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions post-processors/go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ func run() error {
}
}

err = os.Remove(filepath.Join(dirPath, "go.mod"))
if err != nil {
return fmt.Errorf("could not remove go.mod file: %v", err)
}

err = os.Remove(filepath.Join(dirPath, "go.sum"))
if err != nil {
return fmt.Errorf("could not remove go.sum file: %v", err)
}

cmd := exec.Command("go", "mod", "init", "github.com/octokit/go-sdk")
cmd.Dir = dirPath

Expand Down

0 comments on commit b2eb5e3

Please sign in to comment.