-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
21 lines (18 loc) · 846 Bytes
/
Taskfile.yml
File metadata and controls
21 lines (18 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: '3'
vars:
APP_NAME:
sh: python3 -c "import json;print(json.load(open('./package.json', encoding='utf-8'))['name'])"
MONKEY_VERSION:
sh: python3 -c "import json;print(json.load(open('./package.json', encoding='utf-8'))['version'])"
ADMIN_PROTO_VERSION:
sh: python3 -c "import pathlib,re; text=pathlib.Path('./src/meta.ts').read_text(encoding='utf-8'); m=re.search(r\"adminNetworkProtocolVersion:\\s*'([^']+)'\", text); print(m.group(1) if m else 'unknown')"
tasks:
build:
desc: Build tampermonkey script and output versioned userscript file
cmds:
- pnpm install
- pnpm run build
- mkdir -p ./build-artifacts
- |
script_file=$(ls dist/*.user.js | head -n 1)
cp "$script_file" "./build-artifacts/{{.APP_NAME}}-v{{.MONKEY_VERSION}}-proto{{.ADMIN_PROTO_VERSION}}.user.js"