()
| 838 | } |
| 839 | |
| 840 | func updateDependencies() { |
| 841 | // Figure out desired Go version |
| 842 | bs, err := os.ReadFile("go.mod") |
| 843 | if err != nil { |
| 844 | log.Fatal(err) |
| 845 | } |
| 846 | re := regexp.MustCompile(`(?m)^go\s+([0-9.]+)`) |
| 847 | matches := re.FindSubmatch(bs) |
| 848 | if len(matches) != 2 { |
| 849 | log.Fatal("failed to parse go.mod") |
| 850 | } |
| 851 | goVersion := string(matches[1]) |
| 852 | |
| 853 | runPrint(goCmd, "get", "-u", "./...") |
| 854 | runPrint(goCmd, "mod", "tidy", "-go="+goVersion, "-compat="+goVersion) |
| 855 | |
| 856 | // We might have updated the protobuf package and should regenerate to match. |
| 857 | proto() |
| 858 | } |
| 859 | |
| 860 | func proto() { |
| 861 | // buf needs to be installed |
no test coverage detected