File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 5757TESTARGS =
5858endif
5959
60+ ARCH := $(if $(GOARCH ) ,$(GOARCH ) ,$(shell go env GOARCH) )
61+
6062# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables
6163# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below.
6264
6365build-% :
6466 mkdir -p bin
6567 CGO_ENABLED=0 GOOS=linux go build -a -ldflags ' -X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$*
66- CGO_ENABLED=0 GOOS=windows go build -a -ldflags ' -X main.version=$(REV) -extldflags "-static"' -o ./bin/$* .exe ./cmd/$*
68+ if [ " $$ ARCH" = " amd64" ]; then \
69+ CGO_ENABLED=0 GOOS=windows go build -a -ldflags ' -X main.version=$(REV) -extldflags "-static"' -o ./bin/$* .exe ./cmd/$* ; \
70+ fi
6771
6872container-% : build-%
6973 docker build -t $* :latest -f $(shell if [ -e ./cmd/$* /Dockerfile ]; then echo ./cmd/$* /Dockerfile; else echo Dockerfile; fi) --label revision=$(REV ) .
You can’t perform that action at this time.
0 commit comments