-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathTaskfile.yml
61 lines (54 loc) · 1.37 KB
/
Taskfile.yml
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
version: "3"
tasks:
fmt:
desc: format code
vars:
MODULE:
sh: head -n 1 go.mod | cut -d' ' -f2
cmds:
- go mod tidy
- gci write -s standard -s default -s "prefix({{.MODULE}})" .
- gofumpt -w -l .
- golangci-lint run --fix ./...
- shfmt -l -i 2 -ci -sr -w .
lint:
desc: lint code
cmds:
- golangci-lint run ./...
- helm lint 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
dir: helm/pv-migrate
cmds:
- helm-docs
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}}