forked from fastrepl/char
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
74 lines (61 loc) · 2.48 KB
/
Taskfile.yaml
File metadata and controls
74 lines (61 loc) · 2.48 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
version: "3"
dotenv: [".env"]
includes:
web:
taskfile: ./apps/web
dir: ./apps/web
tasks:
py:init: POETRY_VIRTUALENVS_IN_PROJECT=true poetry install --no-cache --no-interaction --all-extras
py:run: poetry run python3 {{.CLI_ARGS}}
stripe: stripe listen --skip-verify --forward-to http://localhost:5000/webhook/stripe
bacon: bacon {{.CLI_ARGS}}
diff:
vars:
DIFF_FROM: "desktop_v0.0.79"
DIFF_TO: "desktop_v0.0.80"
PATHS: "apps/desktop/src-tauri plugins crates"
cmds:
# - git diff {{.DIFF_FROM}} {{.DIFF_TO}} -- {{.PATHS}} > out.diff
- git diff {{.DIFF_FROM}} {{.DIFF_TO}} -- {{.PATHS}} | diff2html -i stdin
jsonschema:
cmds:
- |
jsonschema validate ./plugins/db/seed/schema.json ./plugins/db/seed/onboarding.json
jsonschema validate ./plugins/db/seed/schema.json ./plugins/db/seed/dev.json
bump:
cmds:
- |
CURRENT_VERSION=$(grep -o '"version": "[0-9]\+\.[0-9]\+\.[0-9]\+"' apps/desktop/src-tauri/tauri.conf.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
MAJOR=$(echo $CURRENT_VERSION | cut -d. -f1)
MINOR=$(echo $CURRENT_VERSION | cut -d. -f2)
PATCH=$(echo $CURRENT_VERSION | cut -d. -f3)
NEW_PATCH=$((PATCH + 1))
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
echo "Updating version from $CURRENT_VERSION to $NEW_VERSION"
perl -i -pe "s/^version = \"[0-9]+\.[0-9]+\.[0-9]+\"/version = \"$NEW_VERSION\"/ if \$. < 10" apps/desktop/src-tauri/Cargo.toml
perl -i -pe "s/^ \"version\": \"[0-9]+\.[0-9]+\.[0-9]+\"/ \"version\": \"$NEW_VERSION\"/ if \$. < 10" apps/desktop/src-tauri/tauri.conf.json
cargo update -p desktop
i18n:
cmds:
- |
pnpm -F desktop lingui:extract |
awk -F '│' '($2 ~ /[^ ]/ && $3 ~ /[0-9-]/) {
gsub(/^ *| *$/, "", $2);
gsub(/[^0-9-]/, "", $3);
gsub(/^ *| *$/, "", $4);
printf "{\"language\":\"%s\",\"total\":%d,\"missing\":%d}\n",
$2,
($3 == "-" ? 0: $3),
($4 == "-" ? 0: $4)
}'
bindgen:
cmds:
- |
cargo metadata --format-version=1 --no-deps \
| jq -r '.packages[].name' \
| grep '^tauri-plugin-' \
| xargs -n1 cargo test export_types --package
stt:
cmds:
- chmod +x ./apps/desktop/src-tauri/resources/stt-aarch64-apple-darwin
- chmod +x ./apps/desktop/src-tauri/resources/passthrough-aarch64-apple-darwin