-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (35 loc) · 901 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
34
35
36
37
38
39
40
41
42
43
44
TARGET ?= darwin
ARCH ?= amd64
DOCKER_REPO=itsdalmo/github-pr-resource
SRC=$(shell find . -type f -name '*.go' -not -path "./vendor/*")
default: test
generate:
@echo "== Go Generate =="
go generate ./...
build: test
@echo "== Build =="
CGO_ENABLED=0 GOOS=$(TARGET) GOARCH=$(ARCH) go build -o check -v cmd/check/main.go
CGO_ENABLED=0 GOOS=$(TARGET) GOARCH=$(ARCH) go build -o in -v cmd/in/main.go
CGO_ENABLED=0 GOOS=$(TARGET) GOARCH=$(ARCH) go build -o out -v cmd/out/main.go
test:
@echo "== Test =="
gofmt -s -l -w $(SRC)
go vet -v ./...
go test -race -v ./...
e2e: test
@echo "== Integration =="
go test -race -v ./... -tags=e2e
clean:
@echo "== Cleaning =="
rm check
rm in
rm out
lint:
@echo "== Lint =="
golint cmd
golint src
golint e2e
docker:
@echo "== Docker build =="
docker build -t $(DOCKER_REPO):dev .
.PHONY: default generate build test docker e2e clean lint