-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtaskfile.yml
More file actions
48 lines (40 loc) · 1.21 KB
/
Copy pathtaskfile.yml
File metadata and controls
48 lines (40 loc) · 1.21 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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars:
OUT_DIR: "build"
ENTRY_POINT: "./src/main.go"
BRAND_NAME: "2rm"
tasks:
build:
desc: Builds the program multiple times for every supported system
cmds:
- mkdir -p {{.OUT_DIR}}
- go build -o {{.OUT_DIR}}/{{.BRAND_NAME}} {{.ENTRY_POINT}}
- GOOS=windows GOARCH=386 go build -o {{.OUT_DIR}}/{{.BRAND_NAME}}.exe {{.ENTRY_POINT}}
- pandoc -s --to man ./README.md -o ./{{.OUT_DIR}}/{{.BRAND_NAME}}.1
build-program:
desc: Builds the program targeting the current system
cmds:
- mkdir -p {{.OUT_DIR}}
- go build -o {{.OUT_DIR}}/{{.BRAND_NAME}} {{.ENTRY_POINT}}
test:
desc: Runs the test suite
cmds:
- go test ./src/...
lint:
desc: Run the GoLang staticcheck linter
cmds:
- staticcheck ./src/
install:
desc: Installs artifacts to the system (must be run as root)
cmds:
- scripts/install_artifacts.sh {{.OUT_DIR}}
docs:
desc: Builds documentation
cmds:
- mkdir -p {{.OUT_DIR}}
- pandoc -s --to man ./README.md -o ./{{.OUT_DIR}}/{{.BRAND_NAME}}.1
clean:
desc: Cleans up artifacts
cmds:
- rm -rf {{.OUT_DIR}}