Skip to content

Commit c4467ec

Browse files
committed
Add release build
1 parent 3da1141 commit c4467ec

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
BINARY=epp
22

33
VERSION=1.0.0
4-
GIT_COMMIT=$(git rev-parse @)
5-
LDFLAGS=-ldflags "-X main.Version=$(VERSION) -X main.GitCommit=$(GIT_COMMIT)"
4+
GIT_COMMIT=`git rev-parse @`
5+
LDFLAGS=-X main.Version=$(VERSION) -X main.GitCommit=$(GIT_COMMIT)
66

77
build:
8-
go build $(LDFLAGS) -o $(BINARY)
8+
go build -ldflags "$(LDFLAGS)" -o $(BINARY)
9+
10+
release:
11+
go build -ldflags "-s -w $(LDFLAGS)" -o $(BINARY)

0 commit comments

Comments
 (0)