-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
61 lines (52 loc) · 1.92 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
# https://taskfile.dev
version: '3'
tasks:
default:
desc: Runs application
cmds:
- go run ./cmd/abyss-blackbox/
silent: true
test:
desc: Run all the go tests.
cmds:
- go test ./...
install-deps:
desc: Install dependencies needed to build release
cmds:
- go install github.com/gonutz/rsrc@latest
- go install google.golang.org/protobuf/cmd/[email protected]
silent: true
resources:
desc: Compile resource file
cmds:
- rsrc -manifest ./cmd/abyss-blackbox/main.manifest -ico ./trig_96x96.ico,./images/plus.ico,./images/switch-char.ico,./images/select-area.ico,./images/overlay.ico -o ./cmd/abyss-blackbox/rsrc.syso
debug:
desc: Builds artifacts for release
deps: [test, install-deps, resources]
cmds:
- go generate ./...
- go build -trimpath -ldflags "-s -w -X github.com/shivas/abyss-blackbox/internal/version.RecorderVersion={{.GIT_VERSION}} -X github.com/shivas/abyss-blackbox/internal/version.GoVersion={{.GO_VERSION}}" -o abyss-blackbox.exe ./cmd/abyss-blackbox
- go build -trimpath -ldflags="-s -w" ./cmd/extract/
vars:
GIT_VERSION:
sh: git describe --tags --always
GO_VERSION:
sh: go env GOVERSION
release:
desc: Builds artifacts for release
deps: [test, install-deps, resources]
cmds:
- go generate ./...
- go build -trimpath -ldflags="-H windowsgui -s -w -X github.com/shivas/abyss-blackbox/internal/version.RecorderVersion={{.GIT_VERSION}} -X github.com/shivas/abyss-blackbox/internal/version.GoVersion={{.GO_VERSION}}" -o abyss-blackbox.exe ./cmd/abyss-blackbox
- go build -trimpath -ldflags="-s -w" ./cmd/extract/
vars:
GIT_VERSION:
sh: git describe --tags --always
GO_VERSION:
sh: go env GOVERSION
pack:
desc: Compress executables with UPX
deps: [release]
cmds:
- upx abyss-blackbox.exe
- upx extract.exe