-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 650 Bytes
/
Copy pathMakefile
File metadata and controls
43 lines (32 loc) · 650 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
34
35
36
37
38
39
40
41
42
43
CMD=go
BUILD=$(CMD) build
CLEAN=$(CMD) clean
TEST=$(CMD) test
BINARY_NAME=dsa
BUILD_DIR=build
BINARY_PATH=$(BUILD_DIR)/$(BINARY_NAME)
BINARY_UNIX=$(BINARY_PATH)_unix
IMAGE_NAME=$(BINARY_NAME):latest
.PHONY: all setup build run test watch clean build-linux lint
all: setup lint test build
setup:
./ci/setup.sh
build:
@mkdir -p $(BUILD_DIR)
$(BUILD) -o $(BINARY_PATH) -v
build-linux:
@mkdir -p $(BUILD_DIR)
GOOS=linux GOARCH=amd64 $(BUILD) -o $(BINARY_UNIX) -v
build-docker:
docker build -t $(IMAGE_NAME) .
run:
$(CMD) run .
test:
$(TEST) -v ./...
watch:
gow test ./...
clean:
$(CLEAN)
rm -rf $(BUILD_DIR)
lint:
golangci-lint run