-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (21 loc) · 623 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
VERSION := $(shell git describe --always --tags --dirty)
.PHONY: build
build:
go build -v -ldflags="-X main.version=${VERSION}" -o pivotal-slack-preview
.PRONY: build_image_latest
build_image_latest:
docker build -f build/Dockerfile -t flexoid/pivotal-slack-preview .
.PHONY: run
run: build
./pivotal-slack-preview
.PHONY: test
test:
go test ./... -coverprofile=coverage.out -coverpkg=./...
go tool cover -func coverage.out
.PHONY: lint
lint:
golangci-lint run
.PHONY: coverage_report
coverage_report:
go test ./... -coverprofile=coverage.out -coverpkg=./...
go tool cover -html coverage.out -o coverage.html