forked from utkuozdemir/pv-migrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
49 lines (43 loc) · 1.09 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
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 .
lint:
desc: lint code
cmds:
- golangci-lint run ./...
- helm lint helm/pv-migrate
update-chart:
desc: update the helm chart
cmds:
- helm-docs -c helm/pv-migrate/
- helm package helm/pv-migrate/
- mv pv-migrate-*.tgz migrator/helm-chart.tgz
clean:
desc: clean
cmds:
- rm -rf {{.ROOT_DIR}}/dist/
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}}