-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
28 lines (28 loc) · 1.02 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
version: '3'
vars:
version: 1.2.2
build_flags: CGO_ENABLED=0 go build -a -ldflags '-X "github.com/dusnm/wifiqr/cmd.version={{.version}}" -extldflags "-static"' -o
tasks:
build-linux:
cmds:
- "GOOS=linux GOARCH=amd64 {{.build_flags }} bin/wifiqr-{{.version}}-linux-amd64"
- "GOOS=linux GOARCH=arm64 {{.build_flags }} bin/wifiqr-{{.version}}-linux-arm64"
build-macos:
cmds:
- "GOOS=darwin GOARCH=amd64 {{.build_flags }} bin/wifiqr-{{.version}}-macos-amd64"
- "GOOS=darwin GOARCH=arm64 {{.build_flags }} bin/wifiqr-{{.version}}-macos-arm64"
build-windows:
cmds:
- "GOOS=windows GOARCH=amd64 {{.build_flags }} bin/wifiqr-{{.version}}-windows-amd64.exe"
- "GOOS=windows GOARCH=arm64 {{.build_flags }} bin/wifiqr-{{.version}}-windows-arm64.exe"
build:
cmds:
- for: [linux, macos, windows]
task: build-{{.ITEM}}
fmt:
cmds:
- gofumpt -l -w .
- gci write --skip-generated --skip-vendor -s standard -s default .
test:
cmds:
- go test -race ./...