-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTaskfile.yml
More file actions
48 lines (40 loc) · 1.6 KB
/
Copy pathTaskfile.yml
File metadata and controls
48 lines (40 loc) · 1.6 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
version: '3'
env:
# The design-skill submodule lives under vendor/, which is not Go's dependency vendor tree.
GOFLAGS: '-mod=mod'
vars:
BIN: 'build/bin/akproxy{{if eq OS "windows"}}.exe{{end}}'
VERSION: '{{.VERSION | default "dev"}}'
GIT_REVISION:
sh: git rev-parse --verify HEAD 2>/dev/null || true
tasks:
bindings:
cmds:
- wails3 generate bindings -ts -i
frontend:
deps: [bindings]
cmds:
- pnpm --dir frontend install --frozen-lockfile
- pnpm --dir frontend run build
build:
deps: [frontend]
env:
MACOSX_DEPLOYMENT_TARGET: '12.0'
CGO_CFLAGS: '{{if eq OS "darwin"}}-mmacosx-version-min=12.0{{else}}{{.CGO_CFLAGS}}{{end}}'
CGO_LDFLAGS: '{{if eq OS "darwin"}}-mmacosx-version-min=12.0{{else}}{{.CGO_LDFLAGS}}{{end}}'
cmds:
- go build -tags '{{if eq .DEV "true"}}dev{{else}}production{{end}}' -ldflags '{{if ne .DEV "true"}}-s -w {{end}}-X main.version={{.VERSION}}{{if eq .VERSION "dev"}} -X main.buildRevision={{.GIT_REVISION}}{{end}} {{if eq OS "windows"}}-H windowsgui{{end}}' -o '{{.BIN}}' .
- go build -ldflags '-X akproxy/internal/cli.Version={{.VERSION}}' -o 'build/bin/akproxy-cli{{if eq OS "windows"}}.exe{{end}}' ./cmd/akproxy
- cmd: bash scripts/package-app.sh '{{.VERSION}}'
platforms: [darwin]
package:
deps: [build]
cmds:
- cmd: bash scripts/package-dmg.sh build/bin/akproxy.dmg
platforms: [darwin]
run:
cmds:
- '{{if eq OS "darwin"}}build/bin/akproxy.app/Contents/MacOS/akproxy{{else}}{{.BIN}}{{end}}'
dev:
cmds:
- wails3 dev -config build/config.yml -port 9245