mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-04 05:43:37 +09:00
tools/bump: read the toolchain with GOTOOLCHAIN=local
go env GOVERSION reports the toolchain the go command switched to, so a go.mod that had outrun nixpkgs read back as a nixpkgs that had caught up, and checkToolchain compared 1.27.1 against itself.
This commit is contained in:
+7
-2
@@ -119,9 +119,14 @@ func gateFlake(ctx context.Context, r *repo) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// goVersion is the Go the devShell now provides, without the "go" prefix.
|
// goVersion is the Go the devShell provides, without the "go" prefix.
|
||||||
|
//
|
||||||
|
// GOTOOLCHAIN=local is not optional here. Left to itself the go command
|
||||||
|
// switches to whatever go.mod asks for and reports that instead, so a go.mod
|
||||||
|
// that has outrun nixpkgs looks like a nixpkgs that has caught up, and the one
|
||||||
|
// check that would have noticed compares a value against itself.
|
||||||
func goVersion(ctx context.Context, r *repo) (string, error) {
|
func goVersion(ctx context.Context, r *repo) (string, error) {
|
||||||
out, err := r.nixRun(ctx, "go", "env", "GOVERSION")
|
out, err := r.nixRun(ctx, "env", "GOTOOLCHAIN=local", "go", "env", "GOVERSION")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user