-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (22 loc) · 611 Bytes
/
Makefile
File metadata and controls
33 lines (22 loc) · 611 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
GOCMD=go
MAIN=cmd/lwc/main.go
BIN=bin
VERSION=$(shell git describe --tags --abbrev --always)
# Same format as goreleaser
DATE=$(shell date -u +%Y-%m-%dT%H:%M:%SZ)
LDFLAGS="-s -w -X main.version=$(VERSION) -X main.date=$(DATE)"
all: build test
clean:
rm -rf $(BIN)
build: build_debug build_release
test: test_unit test_integration
bin:
mkdir -p $(BIN)
build_debug: bin
$(GOCMD) build -o $(BIN)/lwc-debug -gcflags=all='-N -l' $(MAIN)
build_release: bin
$(GOCMD) build -o $(BIN)/lwc -ldflags=$(LDFLAGS) $(MAIN)
test_unit:
$(GOCMD) test -v ./...
test_integration: build_release
test/integration.sh