Skip to content

Commit

Permalink
fix: makefile should set GOOS (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
IrvinAufs authored Jan 18, 2022
1 parent 49bdf22 commit ceefa2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ceefa2a

Please sign in to comment.