-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 772 Bytes
/
Makefile
File metadata and controls
37 lines (28 loc) · 772 Bytes
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
GIT := git
PRE_COMMIT := pre-commit
JSONNET_VERSION := v0.22.0
GOLANGCI_VERSION := v2.11.4
VERSION := v0.3.2
.PHONY: fmt
fmt:
@go fmt ./...
.PHONY: lint
lint:
@golangci-lint run -v ./...
.PHONY: test
test:
@go test -v ./...
.PHONY: run
run:
$(PRE_COMMIT) autoupdate
$(PRE_COMMIT) run --all-files
.PHONY: release
release:
@$(GIT) fetch --tags --prune
@$(GIT) tag --sign -m "GPG signed $(VERSION) tag" $(VERSION)
@$(GIT) push --tags
.PHONY: setup
setup:
@go install github.com/google/go-jsonnet/cmd/jsonnet-lint@$(JSONNET_VERSION)
@go install github.com/google/go-jsonnet/cmd/jsonnetfmt@$(JSONNET_VERSION)
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_VERSION)