Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
61 lines (50 loc) · 1.66 KB
/
Copy pathTaskfile.yml
File metadata and controls
61 lines (50 loc) · 1.66 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
version: '3'
includes:
common: ./build/Taskfile.yml
windows: ./build/windows/Taskfile.yml
darwin: ./build/darwin/Taskfile.yml
linux: ./build/linux/Taskfile.yml
vars:
APP_NAME: "lethean"
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}}
fetch-reviews:
summary: Fetches reviews from GitHub
vars:
PR: '{{.PR | default "1"}}'
USER_WORKING_DIR: '{{.USER_WORKING_DIR | default "."}}'
cmds:
- gh pr view '{{.PR}}' -c --json reviews > reviews.json
process-reviews:
summary: Extracts and cleans reviews from coderabbitai[bot] into reviews.txt.
sources:
- '{{.REVIEWS_JSON}}'
generates:
- '{{.REVIEWS_TXT}}'
vars:
REVIEWS_JSON: '{{.USER_WORKING_DIR}}/reviews.json'
REVIEWS_TXT: '{{.USER_WORKING_DIR}}/reviews.txt'
preconditions:
- sh: 'command -v jq'
msg: "jq is not installed. Please install it to continue (e.g., 'brew install jq' or 'sudo apt-get install jq')."
- sh: 'command -v sed'
msg: "sed is not installed. Please install it to continue (e.g., 'brew install sed' or 'sudo apt-get install sed')."
cmds:
- jq '.[] | select(.user.login == "coderabbitai[bot]") | .body' {{.REVIEWS_JSON}} | sed 's/<!--.*-->//g' > {{.REVIEWS_TXT}}