-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathTaskfile.yml
More file actions
66 lines (59 loc) · 1.59 KB
/
Taskfile.yml
File metadata and controls
66 lines (59 loc) · 1.59 KB
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
57
58
59
60
61
62
63
64
65
66
version: "3"
tasks:
fmt:
desc: format code
vars:
MODULE:
sh: head -n 1 go.mod | cut -d' ' -f2
cmds:
- go mod tidy
- go fix ./...
- golangci-lint run --fix ./...
- golangci-lint fmt ./...
- shfmt -l -i 2 -ci -sr -w .
lint:
desc: lint code
cmds:
- go mod tidy --diff
- golangci-lint run ./...
- helm lint internal/helm/pv-migrate
- shfmt -l -i 2 -ci -sr .
clean:
desc: clean
cmds:
- rm -rf {{.ROOT_DIR}}/dist/
update-usage:
desc: update usage
env:
USAGE:
sh: go run ./... --help
cmd: >-
docker run -v {{.ROOT_DIR}}:/project -e USAGE
hairyhenderson/gomplate:stable
--file /project/USAGE.md.gotmpl --out /project/USAGE.md
update-helm-chart-docs:
desc: update helm chart docs
vars:
# renovate: depName=norwoodj/helm-docs datasource=github-releases
HELM_DOCS_VERSION: v1.14.2
cmd: >-
docker run --rm -v {{.ROOT_DIR}}:/helm-docs
jnorwood/helm-docs:{{.HELM_DOCS_VERSION}}
--chart-search-root /helm-docs/internal/helm
build:
desc: build
cmds:
- goreleaser build --snapshot --rm-dist --single-target
release:
desc: release
vars:
NUM_LAST_TAGS: 3
LAST_TAGS:
sh: git tag --sort=-version:refname | head -n {{.NUM_LAST_TAGS}} | xargs echo
NEXT_TAG:
sh: svu next
cmds:
- "echo Last {{.NUM_LAST_TAGS}} tags: {{.LAST_TAGS}}"
- "echo Next tag: {{.NEXT_TAG}}"
- git tag -a {{.NEXT_TAG}} -m "Release {{.NEXT_TAG}}"
- git push origin {{.NEXT_TAG}}