From 85f09e3d68313c8f3380980b90429eb79ecdd61e Mon Sep 17 00:00:00 2001 From: aram price Date: Fri, 22 Sep 2023 15:50:31 -0700 Subject: [PATCH] Make `generate-fake-stemcell-automation` a no-op on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - this fails on our Windows CI workers - we already prepare the fake on a linux worker - update github action to use `cp` directly (since `cp` works on their Windows workers ¯\_(ツ)_/¯ ) --- .github/workflows/go.yml | 2 +- Makefile | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2eaf565d..64e590ce 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,7 +17,7 @@ jobs: go-version-file: go.mod - name: Provide `StemcellAutomation.zip` for `go:embed` consumption in `assets` package run: | - make generate-fake-stemcell-automation + cp integration/construct/assets/StemcellAutomation.zip assets/ - uses: golangci/golangci-lint-action@v3 if: ${{ matrix.os == 'windows-2019' }} - uses: golangci/golangci-lint-action@v3 diff --git a/Makefile b/Makefile index 406466a7..c16e3eb9 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,6 @@ PSMODULES_SOURCES = $(shell find ./modules | grep -v .git | grep -vi "test" | gr BOSH_AGENT_SOURCES = $(shell find $(BOSH_AGENT_REPO) | egrep -v ".git|test.go|fake|.md") ifeq ($(OS),Windows_NT) - SHELL := powershell.exe - .SHELLFLAGS := -NoProfile -Command - COMMAND = out/stembuild.exe CP = cp else @@ -51,8 +48,15 @@ integration/construct : generate-fake-stemcell-automation integration-badger : generate-fake-stemcell-automation go run github.com/onsi/ginkgo/v2/ginkgo -r -v --randomize-all --until-it-fails --timeout 3h integration +ifeq ($(OS),Windows_NT) +generate-fake-stemcell-automation: + @echo "\nThis is a NO-OP on Windows" + @echo "\n - in CI the command 'cp' fails on Windows workers" + @echo "\n - in CI we pre-generate the output of 'generate-fake-stemcell-automation' on a linux worker" +else generate-fake-stemcell-automation: $(CP) integration/construct/assets/StemcellAutomation.zip assets/ +endif generate: assets/StemcellAutomation.zip