2023-04-20 19:25:40 +02:00
|
|
|
# https://taskfile.dev
|
|
|
|
|
|
|
|
version: "3"
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
default:
|
|
|
|
cmds:
|
|
|
|
- task: lint
|
|
|
|
- task: test
|
|
|
|
- task: build
|
|
|
|
|
|
|
|
lint:
|
2023-06-03 11:58:13 +02:00
|
|
|
deps: [lint:frontend, lint:backend, lint:jslib, lint:webext]
|
2023-04-20 19:25:40 +02:00
|
|
|
|
|
|
|
lint:frontend:
|
|
|
|
dir: webui
|
|
|
|
deps: [setup:frontend]
|
2023-04-25 19:35:48 +02:00
|
|
|
sources:
|
|
|
|
- ./**/*.ts
|
|
|
|
- ./**/*.svelte
|
2023-04-20 19:25:40 +02:00
|
|
|
cmds:
|
2023-07-16 19:01:35 +02:00
|
|
|
- pnpm check
|
|
|
|
- pnpm lint
|
2023-04-20 19:25:40 +02:00
|
|
|
|
|
|
|
lint:backend:
|
2023-06-03 11:58:13 +02:00
|
|
|
sources:
|
2023-06-28 18:36:56 +02:00
|
|
|
- ./**/Cargo.toml
|
|
|
|
- ./**/*.rs
|
2023-04-20 19:25:40 +02:00
|
|
|
cmds:
|
|
|
|
- cargo clippy --workspace
|
|
|
|
|
2023-06-03 11:58:13 +02:00
|
|
|
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-06-03 11:58:13 +02:00
|
|
|
|
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
|
|
|
|
2023-04-20 19:25:40 +02:00
|
|
|
test:
|
|
|
|
deps: [test:backend]
|
|
|
|
|
|
|
|
test:backend:
|
2023-06-03 11:58:13 +02:00
|
|
|
sources:
|
2023-06-28 18:36:56 +02:00
|
|
|
- ./**/Cargo.toml
|
|
|
|
- ./**/*.rs
|
2023-04-20 19:25:40 +02:00
|
|
|
cmds:
|
|
|
|
- cargo nextest run --workspace
|
|
|
|
|
|
|
|
build:
|
2023-05-21 21:33:39 +02:00
|
|
|
deps: [build:frontend, build:backend, build:webext]
|
2023-04-20 19:25:40 +02:00
|
|
|
|
|
|
|
build:backend:
|
2023-04-24 20:25:34 +02:00
|
|
|
dir: cli
|
2023-04-20 19:25:40 +02:00
|
|
|
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
|
2023-04-20 19:25:40 +02:00
|
|
|
cmds:
|
2023-07-16 19:01:35 +02:00
|
|
|
- pnpm build
|
2023-04-20 19:25:40 +02:00
|
|
|
|
|
|
|
build:jslib:
|
2023-06-28 18:36:56 +02:00
|
|
|
deps: [build:wasmlib]
|
2023-04-20 19:25:40 +02:00
|
|
|
dir: tools/upend_js
|
|
|
|
cmds:
|
2023-07-25 14:39:57 +02:00
|
|
|
- pnpm install --frozen-lockfile
|
2023-07-16 19:01:35 +02:00
|
|
|
- pnpm build
|
2023-04-20 19:25:40 +02:00
|
|
|
|
2023-06-28 18:36:56 +02:00
|
|
|
build:wasmlib:
|
|
|
|
dir: tools/upend_wasm
|
|
|
|
cmds:
|
|
|
|
- wasm-pack build --target web
|
|
|
|
|
2023-04-20 19:25:40 +02:00
|
|
|
setup:frontend:
|
2023-05-23 23:14:28 +02:00
|
|
|
deps: [build:jslib]
|
2023-04-20 19:25:40 +02:00
|
|
|
dir: webui
|
|
|
|
sources:
|
|
|
|
- ../tools/upend_js/*.js
|
2023-04-25 19:35:48 +02:00
|
|
|
- package.lock
|
2023-04-20 19:25:40 +02:00
|
|
|
cmds:
|
2023-07-25 14:39:57 +02:00
|
|
|
- pnpm install --frozen-lockfile
|
2023-04-20 19:25:40 +02:00
|
|
|
|
2023-05-21 21:33:39 +02:00
|
|
|
build:webext:
|
2023-05-23 23:14:28 +02:00
|
|
|
deps: [setup:webext]
|
2023-05-21 21:33:39 +02:00
|
|
|
dir: webext
|
|
|
|
sources:
|
|
|
|
- ./**/*.ts
|
|
|
|
- ./**/*.svelte
|
|
|
|
cmds:
|
2023-07-16 19:01:35 +02:00
|
|
|
- pnpm build
|
2023-05-27 23:45:43 +02:00
|
|
|
|
|
|
|
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
|
2023-05-21 21:33:39 +02:00
|
|
|
|
|
|
|
setup:webext:
|
2023-05-23 23:14:28 +02:00
|
|
|
deps: [build:jslib]
|
2023-05-21 21:33:39 +02:00
|
|
|
dir: webext
|
|
|
|
sources:
|
|
|
|
- ../tools/upend_js/*.js
|
|
|
|
- package.lock
|
|
|
|
cmds:
|
2023-07-25 14:39:57 +02:00
|
|
|
- pnpm install --frozen-lockfile
|
2023-05-21 21:33:39 +02:00
|
|
|
|
|
|
|
dev:update_tool_deps:
|
|
|
|
cmds:
|
|
|
|
- task: build:jslib
|
2023-08-28 18:12:04 +02:00
|
|
|
- rm -vrf webui/node_modules/.vite/deps
|
2023-05-21 21:33:39 +02:00
|
|
|
|
2023-04-20 19:25:40 +02:00
|
|
|
dev:
|
|
|
|
deps: [dev:backend, dev:frontend]
|
|
|
|
|
|
|
|
dev:backend:
|
2023-04-24 20:25:34 +02:00
|
|
|
dir: cli
|
2023-04-20 19:25:40 +02:00
|
|
|
cmds:
|
2023-06-06 19:01:20 +02:00
|
|
|
- cargo run --release -- serve ../example_vault --clean --no-browser --reinitialize
|
2023-04-20 19:25:40 +02:00
|
|
|
|
|
|
|
dev:frontend:
|
2023-08-21 12:26:02 +02:00
|
|
|
deps: [build:jslib]
|
2023-04-20 19:25:40 +02:00
|
|
|
dir: webui
|
|
|
|
cmds:
|
2023-07-16 19:01:35 +02:00
|
|
|
- pnpm dev --open
|
2023-04-20 19:25:40 +02:00
|
|
|
|
|
|
|
clean:
|
2023-05-23 23:14:28 +02:00
|
|
|
deps:
|
|
|
|
[clean:backend, clean:frontend, clean:webext, clean:tools, clean:vault]
|
2023-04-20 19:25:40 +02:00
|
|
|
|
|
|
|
clean:backend:
|
|
|
|
cmds:
|
|
|
|
- cargo clean
|
|
|
|
|
|
|
|
clean:frontend:
|
|
|
|
cmds:
|
2023-05-23 23:09:52 +02:00
|
|
|
- rm -rf webui/node_modules
|
2023-04-20 19:25:40 +02:00
|
|
|
- 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
|
|
|
|
|
2023-04-20 19:25:40 +02:00
|
|
|
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
|
|
|
|
|
2023-04-20 19:25:40 +02:00
|
|
|
update-schema:
|
|
|
|
cmds:
|
|
|
|
- rm -f upend.sqlite3
|
|
|
|
- diesel migration run --migration-dir migrations/upend/
|
|
|
|
- diesel print-schema > src/database/inner/schema.rs
|