-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (30 loc) · 1.55 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
SHELL = /bin/bash -o pipefail
.PHONY: build build-static lint lint-ci fmt fmt-ci clean release lint-docs audit encrypt decrypt sops
build:
go build -trimpath -ldflags "-s -w" -o docker-volume-mkfs gitlab.com/go-benchmark-kvstore/docker-volume-mkfs
build-static:
go build -trimpath -ldflags "-s -w -linkmode external -extldflags '-static'" -o docker-volume-mkfs gitlab.com/go-benchmark-kvstore/docker-volume-mkfs
lint:
golangci-lint run --timeout 4m --color always --allow-parallel-runners --fix
lint-ci:
golangci-lint run --timeout 4m --out-format colored-line-number,code-climate:codeclimate.json
fmt:
go mod tidy
git ls-files --cached --modified --other --exclude-standard -z | grep -z -Z '.go$$' | xargs -0 gofumpt -w
git ls-files --cached --modified --other --exclude-standard -z | grep -z -Z '.go$$' | xargs -0 goimports -w -local gitlab.com/go-benchmark-kvstore/docker-volume-mkfs
fmt-ci: fmt
git diff --exit-code --color=always
clean:
rm -f docker-volume-mkfs
release:
npx --yes --package '[email protected]' --package '@release-it/[email protected]' -- release-it
lint-docs:
npx --yes --package 'markdownlint-cli@~0.34.0' -- markdownlint --ignore-path .gitignore --ignore testdata/ '**/*.md'
audit:
go list -json -deps ./... | nancy sleuth --skip-update-check
encrypt:
gitlab-config sops --encrypt --mac-only-encrypted --in-place --encrypted-comment-regex sops:enc .gitlab-conf.yml
decrypt:
SOPS_AGE_KEY_FILE=keys.txt gitlab-config sops --decrypt --in-place .gitlab-conf.yml
sops:
SOPS_AGE_KEY_FILE=keys.txt gitlab-config sops .gitlab-conf.yml