-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
32 lines (25 loc) · 1.04 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
version: "3"
vars:
APP_NAME: "bc"
VERSION: "1.0.0"
LDFLAGS: "-X 'cmd/cli/main.go.version={{.VERSION}}'"
tasks:
build-darwin:
cmds:
- CGO_ENABLED=0 GOOS=darwin go build -ldflags {{.LDFLAGS}} -a -installsuffix cgo -o bin/darwin/{{.APP_NAME}} ./cmd/cli/main.go
build-amd64:
cmds:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags {{.LDFLAGS}} -a -installsuffix cgo -o bin/amd64/{{.APP_NAME}}-darwin ./cmd/cli/main.go
build-arm:
cmds:
- CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags {{.LDFLAGS}} -a -installsuffix cgo -o bin/arm/{{.APP_NAME}}-darwin ./cmd/cli/main.go
build-arm64:
cmds:
- CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags {{.LDFLAGS}} -a -installsuffix cgo -o bin/arm64/{{.APP_NAME}}-darwin ./cmd/cli/main.go
build-windows:
cmds:
- CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags {{.LDFLAGS}} -a -installsuffix cgo -o bin/windows/{{.APP_NAME}}.exe ./cmd/cli/main.go
gorelease:
cmds:
- goreleaser release --clean
- rm -rf dist