-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (35 loc) · 1.07 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
44
45
46
47
48
49
50
51
52
default: pluvio-api
BUILD_TIME=$(shell date +%FT%T%z)
GIT_REVISION=$(shell git rev-parse --short HEAD)
GIT_BRANCH=$(shell git rev-parse --symbolic-full-name --abbrev-ref HEAD)
GIT_DIRTY=$(shell git diff-index --quiet HEAD -- || echo "x-")
LDFLAGS=-ldflags "-s -X main.BuildStamp=$(BUILD_TIME) -X main.GitHash=$(GIT_DIRTY)$(GIT_REVISION) -X main.gitBranch=$(GIT_BRANCH)"
srcfiles = cmd/pluvio-api/main.go
testpackages = ./...
pluvio-api: $(srcfiles)
go build -o bin/pluvio-api $(LDFLAGS) cmd/pluvio-api/main.go
docker:
docker-compose up
docker-down:
docker-compose down
docker-build:
docker build $(DOCKER_BUILD_ARGS) -t $(DOCKER_IMAGE):$(DOCKER_TAG) .
lint:
golangci-lint run --deadline 20m
test:
go test -count=1 $(testpackages)
integration-test:
@echo "Running integration tests, please ensure RMQ is running..."
go test --tags=integration -count=1 $(testpackages)
test-verbose:
go test -v $(testpackages)
run-dev:
CompileDaemon -command=bin/pluvio-api -build="make"
mod-tidy:
go mod tidy
show-deps:
go list -m all
clean:
@rm -f bin/*
tidy:
go mod tidy