-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
121 lines (104 loc) · 3.11 KB
/
Copy pathTaskfile.yml
File metadata and controls
121 lines (104 loc) · 3.11 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: '3'
includes:
common: ./build/Taskfile.yml
windows: ./build/windows/Taskfile.yml
darwin: ./build/darwin/Taskfile.yml
linux: ./build/linux/Taskfile.yml
ios: ./build/ios/Taskfile.yml
android: ./build/android/Taskfile.yml
vars:
APP_NAME: "MarkdownMD"
BIN_DIR: "bin"
VITE_PORT: '{{.WAILS_VITE_PORT | default 9245}}'
tasks:
build:
summary: Builds the application
cmds:
- task: "{{OS}}:build"
package:
summary: Packages a production build of the application
cmds:
- task: "{{OS}}:package"
run:
summary: Runs the application
cmds:
- task: "{{OS}}:run"
dev:
summary: Runs the application in development mode
cmds:
- wails3 dev -config ./build/config.yml -port {{.VITE_PORT}}
setup:pro:
summary: Prepare a local pro build (requires sibling at ../md-pro).
desc: |
Generates the Go workspace that lets `go build -tags pro` resolve the
private md-pro module from a sibling working tree. Without
this file (or a CI-equivalent fetch), pro builds fail with a clear
"no required module provides..." error.
Re-run if you move the sibling repo or change its Go module path.
preconditions:
- sh: test -d ../md-pro/pro
msg: |
Sibling repo ../md-pro not found. Pro builds require the
private repo to be checked out at the same level as this one:
git clone <md-pro url> ../md-pro
cmds:
- |
cat > go.work <<'EOF'
go 1.25.0
use (
.
../md-pro
)
EOF
build:pro:
summary: Build with pro features. Requires `task setup:pro` first.
desc: |
Sets PRO=1 in the OS environment, then re-invokes `wails3 task build`
as a subprocess so the deeply-nested vite step (common:build:frontend)
inherits PRO from its parent process. Task's own env: doesn't
propagate through `task:` directives — but it DOES propagate into
spawned subprocesses, so wrapping the build in another wails3 call
gets PRO down to npm.
deps:
- task: setup:pro
cmds:
- wails3 task build EXTRA_TAGS=pro
env:
PRO: "1"
package:pro:
summary: Package a pro release for this platform.
deps:
- task: setup:pro
cmds:
- wails3 task package EXTRA_TAGS=pro
env:
PRO: "1"
dev:pro:
summary: Dev mode with pro features enabled.
deps:
- task: setup:pro
cmds:
- wails3 dev -config ./build/config.yml -port {{.VITE_PORT}}
env:
PRO: "1"
EXTRA_TAGS: pro
setup:docker:
summary: Builds Docker image for cross-compilation (~800MB download)
cmds:
- task: common:setup:docker
build:server:
summary: Builds the application in server mode (no GUI, HTTP server only)
cmds:
- task: common:build:server
run:server:
summary: Runs the application in server mode
cmds:
- task: common:run:server
build:docker:
summary: Builds a Docker image for server mode deployment
cmds:
- task: common:build:docker
run:docker:
summary: Builds and runs the Docker image
cmds:
- task: common:run:docker