Skip to content

Commit

Permalink
Make generate-fake-stemcell-automation a no-op on Windows
Browse files Browse the repository at this point in the history
- 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 ¯\_(ツ)_/¯ )
  • Loading branch information
aramprice committed Sep 22, 2023
1 parent 4ddd388 commit 85f09e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 85f09e3

Please sign in to comment.