-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.dist.yaml
More file actions
77 lines (77 loc) · 2.17 KB
/
Taskfile.dist.yaml
File metadata and controls
77 lines (77 loc) · 2.17 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
# Task is a task runner / build tool that aims
# to be simpler and easier to use.
# https://taskfile.dev/installation/
version: '3'
vars:
BINNAME: zipcmt
tasks:
default:
desc: "Task runner for the zipcmt source code."
cmds:
- task --list-all
silent: true
doc:
desc: "Generate and browse the application module documentation."
cmds:
- cmd: pkgsite -http localhost:8090
silent: true
lint:
silent: false
desc: Runs the go formatter and lints the source code.
ignore_error: true
cmds:
- cmd: clear
platforms: [linux, darwin, freebsd]
- cmd: gci write ./..
- cmd: gofumpt -w .
- cmd: golangci-lint run
nil:
desc: "Run the static analysis techniques to catch Nil dereferences."
cmds:
- go tool nilaway -test=false ./...
release:
desc: "GoReleaser"
cmds:
- cmd: goreleaser release --snapshot --clean
build:
desc: "Build the binary of the program."
cmds:
- cmd: echo "Building..."
- cmd: go build -o {{.BINNAME}} -v main.go
platforms: [linux, darwin, freebsd]
- cmd: go build -o {{.BINNAME}}.exe -v main.go
platforms: [windows]
- cmd: echo "Done!"
buildr:
desc: "Build the binary of the program with race detection."
cmds:
- cmd: echo "Building with race conditions..."
- cmd: go build -o {{.BINNAME}} -race -v main.go
platforms: [linux, darwin, freebsd]
- cmd: go build -o {{.BINNAME}}.exe -race -v main.go
platforms: [windows]
- cmd: ./{{.BINNAME}} --version
platforms: [linux, darwin]
- cmd: ./{{.BINNAME}}.exe --version
platforms: [windows]
- cmd: echo "Done!"
pkg-patch:
silent: false
desc: Update and apply patches to the web server dependencies.
cmds:
- cmd: go get -u=patch -x
- cmd: go mod verify
pkg-update:
silent: false
desc: Update the web server dependencies.
cmds:
- cmd: go get -u -x
- cmd: go mod verify
test:
desc: "Run the test suite."
cmds:
- go test -count=1 ./...
testr:
desc: "Run the verbose test suite with the slower race detection."
cmds:
- go test -count=1 -race ./...