generated from gleich/go_template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
40 lines (35 loc) · 806 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
##########
# Building
##########
build-docker-prod:
docker build -f docker/Dockerfile -t mattgleich/ctree:latest .
build-docker-dev-lint:
docker build -f docker/dev.lint.Dockerfile -t mattgleich/ctree:lint .
build-go:
go get -v -t -d ./...
go build -v .
rm ctree
#########
# Linting
#########
lint-golangci:
golangci-lint run
lint-gomod:
go mod tidy
git diff --exit-code go.mod
git diff --exit-code go.sum
lint-goreleaser:
goreleaser check
lint-hadolint:
hadolint docker/Dockerfile
hadolint docker/dev.lint.Dockerfile
lint-in-docker: build-docker-dev-lint
docker run mattgleich/ctree:lint
##########
# Grouping
##########
# Linting
local-lint: lint-golangci lint-goreleaser lint-hadolint lint-gomod
docker-lint: lint-in-docker
# Build
local-build: build-docker-prod build-docker-dev-lint