Skip to content

Commit 83cad2f

Browse files
committed
ci: update make targets
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 5887d3b commit 83cad2f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ PACKAGE := github.com/runfinch/finch-daemon
1717
VERSION := $(shell git describe --match 'v[0-9]*' --dirty='.modified' --always --tags)
1818
GITCOMMIT := $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
1919

20+
ifndef GODEBUG
21+
EXTRA_LDFLAGS += -s -w
22+
endif
23+
2024
LDFLAGS := -X $(PACKAGE)/version.Version=$(VERSION) -X $(PACKAGE)/version.GitCommit=$(GITCOMMIT)
2125

2226
ifeq ($(STATIC),)
@@ -27,10 +31,16 @@ else
2731
$(info Building Dynamic Binary)
2832
endif
2933

34+
LDFLAGS += $(EXTRA_LDFLAGS)
35+
3036
.PHONY: build
3137
build:
3238
GOOS=linux go build $(if $(GO_BUILDTAGS), -tags "$(GO_BUILDTAGS)") -ldflags "$(LDFLAGS)" -v -o $(BINARY) $(PACKAGE)/cmd/finch-daemon
3339

40+
clean:
41+
@rm -f $(BINARIES)
42+
@rm -rf $(BIN)
43+
3444
.PHONY: linux
3545
linux:
3646
ifneq ($(shell uname), Linux)

0 commit comments

Comments
 (0)