File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 57
57
TESTARGS =
58
58
endif
59
59
60
+ ARCH := $(if $(GOARCH ) ,$(GOARCH ) ,$(shell go env GOARCH) )
61
+
60
62
# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables
61
63
# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below.
62
64
63
65
build-% :
64
66
mkdir -p bin
65
67
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
67
71
68
72
container-% : build-%
69
73
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