-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
33 lines (27 loc) · 876 Bytes
/
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
SHELL := /bin/bash
# go options
GO ?= go
LDFLAGS :=
GOFLAGS :=
BINDIR ?= $(CURDIR)/bin
all: bin
.PHONY: bin
bin:
@mkdir -p $(BINDIR)
GOOS=linux $(GO) build -o $(BINDIR) $(GOFLAGS) -ldflags '$(LDFLAGS)' github.com/antoninbas/benchci/...
.PHONY: test
test:
@echo "==> Running all tests <=="
GOOS=linux $(GO) test ./... -v
# code linting
.golangci-bin:
@echo "===> Installing Golangci-lint <==="
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $@ v1.41.1
.PHONY: golangci
golangci: .golangci-bin
@echo "===> Running golangci <==="
@GOOS=linux .golangci-bin/golangci-lint run -c .golangci.yml
.PHONY: golangci-fix
golangci-fix: .golangci-bin
@echo "===> Running golangci-fix <==="
@GOOS=linux .golangci-bin/golangci-lint run -c .golangci.yml --fix