upend/Taskfile.yml

177 lines
3.3 KiB
YAML
Raw Normal View History

# https://taskfile.dev
version: "3"
tasks:
default:
cmds:
- task: lint
- task: test
- task: build
lint:
deps: [lint:frontend, lint:backend, lint:jslib, lint:webext]
lint:frontend:
dir: webui
deps: [setup:frontend]
2023-04-25 19:35:48 +02:00
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
2023-07-16 19:01:35 +02:00
- pnpm check
- pnpm lint
lint:backend:
sources:
2023-06-28 18:36:56 +02:00
- ./**/Cargo.toml
- ./**/*.rs
cmds:
- cargo clippy --workspace
lint:jslib:
deps: [build:jslib]
dir: tools/upend_js
sources:
- ./*.ts
- ./package.lock
cmds:
2023-07-16 19:01:35 +02:00
- pnpm lint
2023-05-21 21:46:33 +02:00
lint:webext:
dir: webext
deps: [setup:webext]
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
2023-07-16 19:01:35 +02:00
- pnpm lint
2023-05-21 21:46:33 +02:00
test:
deps: [test:backend]
test:backend:
sources:
2023-06-28 18:36:56 +02:00
- ./**/Cargo.toml
- ./**/*.rs
cmds:
- cargo nextest run --workspace
build:
deps: [build:frontend, build:backend, build:webext]
build:backend:
2023-04-24 20:25:34 +02:00
dir: cli
sources:
- ./**/Cargo.toml
- ./**/*.rs
cmds:
- cargo build --release
build:frontend:
dir: webui
2023-05-23 23:14:28 +02:00
deps: [setup:frontend]
2023-04-25 19:35:48 +02:00
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
2023-07-16 19:01:35 +02:00
- pnpm build
build:jslib:
2023-06-28 18:36:56 +02:00
deps: [build:wasmlib]
dir: tools/upend_js
cmds:
- pnpm install --frozen-lockfile
2023-07-16 19:01:35 +02:00
- pnpm build
2023-06-28 18:36:56 +02:00
build:wasmlib:
dir: tools/upend_wasm
cmds:
- wasm-pack build --target web
setup:frontend:
2023-05-23 23:14:28 +02:00
deps: [build:jslib]
dir: webui
sources:
- ../tools/upend_js/*.js
2023-04-25 19:35:48 +02:00
- package.lock
cmds:
- pnpm install --frozen-lockfile
build:webext:
2023-05-23 23:14:28 +02:00
deps: [setup:webext]
dir: webext
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
2023-07-16 19:01:35 +02:00
- pnpm build
build:webext:package-sources:
deps: [build:webext]
cmds:
- mkdir -p webext/web-ext-artifacts/tmp/upend/
- git ls-files -z tools/upend_js | xargs -0 cp --parents -t webext/web-ext-artifacts/tmp/upend
- git ls-files -z webext | xargs -0 cp --parents -t webext/web-ext-artifacts/tmp/upend
- cd webext/web-ext-artifacts/tmp/ && zip -vr ../upend-webext-sources.zip upend
setup:webext:
2023-05-23 23:14:28 +02:00
deps: [build:jslib]
dir: webext
sources:
- ../tools/upend_js/*.js
- package.lock
cmds:
- pnpm install --frozen-lockfile
dev:update_tool_deps:
cmds:
- task: build:jslib
- rm -vrf webui/node_modules/.vite/deps
dev:
deps: [dev:backend, dev:frontend]
dev:backend:
2023-04-24 20:25:34 +02:00
dir: cli
cmds:
2023-06-06 19:01:20 +02:00
- cargo run --release -- serve ../example_vault --clean --no-browser --reinitialize
dev:frontend:
deps: [build:jslib]
dir: webui
cmds:
2023-07-16 19:01:35 +02:00
- pnpm dev --open
clean:
2023-05-23 23:14:28 +02:00
deps:
[clean:backend, clean:frontend, clean:webext, clean:tools, clean:vault]
clean:backend:
cmds:
- cargo clean
clean:frontend:
cmds:
2023-05-23 23:09:52 +02:00
- rm -rf webui/node_modules
- rm -vrf webui/dist webui/public/vendor
2023-05-23 23:09:52 +02:00
clean:webext:
cmds:
- rm -rf webext/node_modules
- rm -vrf webext/web-ext-artifacts webext/dist
clean:tools:
cmds:
- rm -vrf tools/upend_js/*.js
2023-04-23 19:08:56 +02:00
clean:vault:
cmds:
- rm -vrf example_vault/.upend
update-schema:
cmds:
- rm -f upend.sqlite3
- diesel migration run --migration-dir migrations/upend/
- diesel print-schema > src/database/inner/schema.rs