-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (29 loc) · 1.02 KB
/
Makefile
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
REPO_ROOT = $(shell git rev-parse --show-toplevel)
BIN_DIR = $(REPO_ROOT)/bin
$(BIN_DIR):
mkdir -p $@
######################################################################
NAME = condition-bitbucket
BIN = $(BIN_DIR)/$(NAME)
######################################################################
GOLANGCILINT_VERSION = v1.50.1
GOLANGCILINT_NAME = golangci-lint
GOLANGCILINT_PATH = $(REPO_ROOT)/bin
GOLANGCILINT_URL = https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh
GOLANGCILINT = $(REPO_ROOT)/bin/$(GOLANGCILINT_NAME)
$(GOLANGCILINT):
cd $(REPO_ROOT); curl -sSfL $(GOLANGCILINT_URL) | sh -s -- -b $(BIN_DIR) $(GOLANGCILINT_VERSION)
######################################################################
######################################################################
.PHONY: clean
clean:
rm -f $(BIN)
.PHONY: lint
lint: $(GOLANGCILINT)
$(GOLANGCILINT) run
.PHONY: test
test:
go test -v ./...
.PHONY: build
build:
go build -o $(BIN) $(REPO_ROOT)/cmd/condition-bitbucket