-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
84 lines (74 loc) · 1.94 KB
/
Taskfile.yml
File metadata and controls
84 lines (74 loc) · 1.94 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3'
vars:
BINARY_NAME: kontext
DIST_DIR: dist
VERSION:
sh: git describe --tags --always --dirty 2>/dev/null || echo dev
tasks:
build:
desc: Build for current platform
cmds:
- mkdir -p {{.DIST_DIR}}
- go build -ldflags "-X github.com/w1ndys/kontext/cmd.Version={{.VERSION}}" -o {{.DIST_DIR}}/{{.BINARY_NAME}} .
build:target:
internal: true
cmds:
- mkdir -p {{.DIST_DIR}}
- GOOS={{.GOOS}} GOARCH={{.GOARCH}} CGO_ENABLED=0 go build -ldflags "-X github.com/w1ndys/kontext/cmd.Version={{.VERSION}}" -o {{.DIST_DIR}}/{{.OUTPUT}} .
build:darwin:amd64:
desc: Build for macOS amd64
cmds:
- task: build:target
vars:
GOOS: darwin
GOARCH: amd64
OUTPUT: kontext_darwin_amd64
build:darwin:arm64:
desc: Build for macOS arm64
cmds:
- task: build:target
vars:
GOOS: darwin
GOARCH: arm64
OUTPUT: kontext_darwin_arm64
build:linux:amd64:
desc: Build for Linux amd64
cmds:
- task: build:target
vars:
GOOS: linux
GOARCH: amd64
OUTPUT: kontext_linux_amd64
build:linux:arm64:
desc: Build for Linux arm64
cmds:
- task: build:target
vars:
GOOS: linux
GOARCH: arm64
OUTPUT: kontext_linux_arm64
build:windows:amd64:
desc: Build for Windows amd64
cmds:
- task: build:target
vars:
GOOS: windows
GOARCH: amd64
OUTPUT: kontext_windows_amd64.exe
build:windows:arm64:
desc: Build for Windows arm64
cmds:
- task: build:target
vars:
GOOS: windows
GOARCH: arm64
OUTPUT: kontext_windows_arm64.exe
build:all:
desc: Build for all supported platforms
deps:
- build:darwin:amd64
- build:darwin:arm64
- build:linux:amd64
- build:linux:arm64
- build:windows:amd64
- build:windows:arm64