forked from mhrabovcin/troubleshoot-live
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (47 loc) · 1.15 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
53
54
55
56
GORELEASER_PARALLELISM ?= $(shell nproc --ignore=1)
GORELEASER_DEBUG ?= false
export DOCKER_REGISTRY ?= ghcr.io
export DOCKERHUB_ORG ?= mhrabovcin
export GIT_TREE_STATE ?=
.PHONY: gogenerate
gogenerate:
go generate ./...
.PHONY: test
test: tools.gotestsum gogenerate
gotestsum --format pkgname --junitfile unit-tests.xml --jsonfile test.json -- -coverprofile=cover.out ./... && \
go tool cover -func=cover.out
.PHONY: lint
lint:
helm lint --strict ./charts/troubleshoot-live
golangci-lint run --fix
ifndef GORELEASER_CURRENT_TAG
export GORELEASER_CURRENT_TAG=$(GIT_TAG)
endif
.PHONY: build-snapshot
build-snapshot:
goreleaser \
build \
--snapshot \
--clean \
--parallelism=$(GORELEASER_PARALLELISM) \
$(if $(BUILD_ALL),,--single-target) \
.PHONY: release
release:
goreleaser \
release \
--clean \
--parallelism=$(GORELEASER_PARALLELISM) \
--timeout=60m \
$(GORELEASER_FLAGS)
.PHONY: release-snapshot
release-snapshot:
goreleaser \
release \
--snapshot \
--skip-publish \
--clean \
--parallelism=$(GORELEASER_PARALLELISM) \
--timeout=60m
.PHONY: tools.gotestsum
tools.gotestsum:
go install gotest.tools/[email protected]