diff --git a/Makefile b/Makefile index ddcadab5..0b975967 100755 --- a/Makefile +++ b/Makefile @@ -17,13 +17,16 @@ CLEAN_COMMIT ?= "$(shell git describe --long --always --match "" || true)" COMMIT_TIME ?= "$(shell git show -s --format=%ct $(CLEAN_COMMIT) || true)" LDFLAGS ?= -s -w -X github.com/gauss-project/aurorafs.commitHash="$(COMMIT_HASH)" -X github.com/gauss-project/aurorafs.commitTime="$(COMMIT_TIME)" +GOOS ?= "$(shell go env GOOS)" +SHELL=bash + .PHONY: all all: build lint vet test-race binary .PHONY: binary binary: dist FORCE $(GO) version -ifeq ("$(shell go env GOOS)", "windows") +ifeq ("$(GOOS)", "windows") set CGO_ENABLED=0 $(GO) build -trimpath -ldflags "$(LDFLAGS)" -o dist/aurora.exe ./cmd/aurorafs else