-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
85 lines (74 loc) · 2.04 KB
/
Taskfile.yml
File metadata and controls
85 lines (74 loc) · 2.04 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: "3"
silent: true
env:
GO111MODULE: on
vars:
# dist env
ENV_DIST_PATH: dist
tasks:
default:
desc: "default task show environment"
dir: '{{.TASKFILE_DIR}}'
cmds:
- goreleaser --version
clean:
dir: '{{.TASKFILE_DIR}}'
desc: clean dist
cmds:
- '{{if eq OS "windows"}}powershell Remove-Item -Recurse -Force -path {{.ENV_DIST_PATH}} \| Out-Null{{else}}rm -rf {{.ENV_DIST_PATH}}{{end}}'
- 'echo {{if eq OS "windows"}}"clean at windows path: {{.ENV_DIST_PATH}}"{{else}}"clean not at windows path: {{.ENV_DIST_PATH}}"{{end}}'
build:
dir: '{{.TASKFILE_DIR}}'
desc: Build the binary
sources:
- ./**/*.go
generates:
- goreleaser
cmds:
- go build
goreleaser-prepare:
desc: Prepare the GoReleaser generated cli
dir: '{{.TASKFILE_DIR}}'
cmds:
- go install github.com/goreleaser/goreleaser/v2@v2.7.0
- goreleaser --version
- goreleaser check
goreleaser-healthcheck:
desc: check GoReleaser generated before
dir: '{{.TASKFILE_DIR}}'
internal: true
cmds:
- goreleaser --version
- goreleaser healthcheck
goreleaser-build-snapshot:
desc: Build the GoReleaser binary local snapshot
deps:
- build
- goreleaser-healthcheck
dir: '{{.TASKFILE_DIR}}'
cmds:
- goreleaser build --clean --timeout 60m --snapshot
goreleaser-release-snapshot:
desc: Run GoReleaser either in snapshot mode
deps:
- build
- goreleaser-healthcheck
dir: '{{.TASKFILE_DIR}}'
cmds:
- goreleaser release --clean --timeout 60m --snapshot
goreleaser-build:
desc: Build the GoReleaser binary local
deps:
- build
- goreleaser-healthcheck
dir: '{{.TASKFILE_DIR}}'
cmds:
- goreleaser build --clean --timeout 60m --auto-snapshot
goreleaser-release:
desc: Run GoReleaser either in snapshot or release mode
deps:
- build
- goreleaser-healthcheck
dir: '{{.TASKFILE_DIR}}'
cmds:
- goreleaser release --clean --timeout 60m --auto-snapshot