From 27160703f911e01210f1c06e5d864e9d8fb3f42d Mon Sep 17 00:00:00 2001 From: Slug-Boi Date: Mon, 25 Nov 2024 20:02:12 +0100 Subject: [PATCH] ci: try and add env var earlier in the workflow --- ci/build_test_release.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ci/build_test_release.go b/ci/build_test_release.go index 21cbb77..08d5eff 100644 --- a/ci/build_test_release.go +++ b/ci/build_test_release.go @@ -35,22 +35,24 @@ func main() { // set the working directory in the container // install application dependencies runner := source.WithWorkdir("/src_d/src/"). - WithExec([]string{"go", "mod", "tidy"}) + WithExec([]string{"go", "mod", "tidy"}).WithEnvVariable("CI", "true") // run application tests - test := runner.WithWorkdir("/src_d/src/").WithExec([]string{"go", "test", "./..."}).WithEnvVariable("CI", "true") - + test := runner.WithWorkdir("/src_d/src/").WithExec([]string{"go", "test", "./..."}) + //.WithEnvVariable("CI", "true") + buildDir := test.Directory("/src/") for _, goos := range geese { path := fmt.Sprintf("/dist/") - filename := fmt.Sprintf("/dist/cocommit_go-%s", goos) + filename := fmt.Sprintf("/dist/cocommit_go-%s", goos) // build application // write the build output to the host build := test. WithEnvVariable("GOOS", goos). WithEnvVariable("GOARCH", goarch). - WithExec([]string{"go", "build", "-o", filename}).WithEnvVariable("CI", "true") + WithExec([]string{"go", "build", "-o", filename}) + //.WithEnvVariable("CI", "true") buildDir = buildDir.WithDirectory(path, build.Directory(path))