-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yaml
More file actions
34 lines (30 loc) · 865 Bytes
/
taskfile.yaml
File metadata and controls
34 lines (30 loc) · 865 Bytes
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
version: "3"
tasks:
build:
desc: Build sshproxy for all supported OS and ARCH
cmds:
- for:
matrix:
OS: [ "linux", "darwin" ]
ARCH: [ "amd64", "arm64" ]
vars:
OS: "{{.ITEM.OS}}"
ARCH: "{{.ITEM.ARCH}}"
task: build-osarch
build-osarch:
desc: Build sshproxy for a specific OS and ARCH
vars:
TARGET_NAME: sshproxy-{{.OS}}-{{.ARCH}}
cmds:
- mkdir -p build/{{.TARGET_NAME}}
- GOOS={{.OS}} GOARCH={{.ARCH}} go build -o build/{{.TARGET_NAME}}/sshproxy ./main.go
- tar -czf build/{{.TARGET_NAME}}.tar.gz -C build/{{.TARGET_NAME}} .
unittest:
desc: Run unit tests
cmds:
- go test ./...
coverage:
desc: Generate coverage report
cmds:
- go test -coverprofile=coverage.out ./...
- go tool cover -html=coverage.out