-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.dist.yaml
92 lines (89 loc) · 2.58 KB
/
Taskfile.dist.yaml
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
86
87
88
89
90
91
92
# Task is a task runner / build tool that aims
# to be simpler and easier to use.
# https://taskfile.dev/installation/
version: '3'
vars:
BINNAME: retrotxt
tasks:
default:
desc: "Task runner for the retrotxt source code."
cmds:
- task --list-all
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
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!"
tag:
desc: "Print the current git tag."
silent: true
cmds:
- cmd: echo "The current git tag is:"
- cmd: git describe --tags
- cmd: echo ""
- cmd: echo "To add a tag, run git tag -a v0.0.0 -m 'Message'"
- cmd: echo "To push a tag, run git push origin v0.0.0"
- cmd: echo "To create a release, run goreleaser release --clean"
test:
desc: "Run the test suite."
cmds:
- go test -count=1 ./...
test5x:
desc: "Run the test suite 5 times over."
cmds:
- go test -count=5 ./...
testr:
desc: "Run the verbose test suite with the slower race detection."
cmds:
- go test -count=1 -race ./...
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
ver:
silent: false
desc: Print the versions of the build and compiler tools.
ignore_error: true
cmds:
- cmd: go version
- cmd: gofumpt --version
- cmd: gci --version
- cmd: task --version
- cmd: golangci-lint --version
- cmd: goreleaser --version