Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
zoncoen committed Feb 21, 2024
1 parent 5e7d5bc commit bb69caf
Showing 3 changed files with 66 additions and 61 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ SHELL := /bin/bash
.DEFAULT_GOAL := test

GO ?= go
export GOTOOLCHAIN := go$(shell $(GO) version | perl -ape '$$_ = $$F[2]; s/go(.+)/$$1/')

BIN_DIR := $(CURDIR)/.bin
export GOBIN := $(BIN_DIR)
@@ -91,6 +92,7 @@ $(LOOPPOINTER): | $(BIN_DIR)

.PHONY: build
build: | $(BIN_DIR)
echo GOTOOLCHAIN=$(GOTOOLCHAIN)
@$(GO) install ./cmd/scenarigo

.PHONY: test
1 change: 1 addition & 0 deletions cmd/scenarigo/cmd/plugin/build.go
Original file line number Diff line number Diff line change
@@ -463,6 +463,7 @@ func execute(ctx context.Context, wd, name string, args ...string) error {
func executeWithEnvs(ctx context.Context, envs []string, wd, name string, args ...string) error {
var stderr bytes.Buffer
cmd := exec.CommandContext(ctx, name, args...)
envs = append(envs, fmt.Sprintf("GOTOOLCHAIN=%s", goMajorMinor))
cmd.Env = append(os.Environ(), envs...)
if wd != "" {
cmd.Dir = wd
Loading

0 comments on commit bb69caf

Please sign in to comment.