upend/Taskfile.yml

152 lines
2.8 KiB
YAML
Raw Normal View History

# https://taskfile.dev
version: "3"
vars:
GREETING: Hello, World!
tasks:
default:
cmds:
- task: lint
- task: test
- task: build
package:
cmds:
- task:clean
- task:default
- rm -fr dist
- linuxdeploy-x86_64.AppImage --appdir dist
- cp target/release/upend dist/usr/bin/upend
- cp -r webui/dist dist/usr/bin/webui
- cp assets/upend.png dist/usr/share/icons/upend.png
- linuxdeploy-x86_64.AppImage --appdir dist -d upend.desktop --output appimage
vars:
VERSION:
sh: grep '^version' Cargo.toml|grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
lint:
deps: [lint:frontend, lint:backend]
lint:frontend:
dir: webui
deps: [setup:frontend]
2023-04-25 19:35:48 +02:00
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
- yarn check
- yarn lint
lint:backend:
cmds:
- cargo clippy --workspace
test:
deps: [test:backend]
test:backend:
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
deps: [setup:frontend, build:jslib]
2023-04-25 19:35:48 +02:00
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
- yarn build
build:jslib:
dir: tools/upend_js
2023-04-23 19:10:43 +02:00
sources:
2023-04-25 19:35:48 +02:00
- ./*.ts
- ./package.lock
cmds:
- yarn install --immutable
- yarn build
setup:frontend:
dir: webui
sources:
- ../tools/upend_js/*.js
2023-04-25 19:35:48 +02:00
- package.lock
cmds:
- yarn add ../tools/upend_js
- yarn install --immutable
build:webext:
deps: [setup:webext, build:jslib]
dir: webext
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
- yarn build
setup:webext:
dir: webext
sources:
- ../tools/upend_js/*.js
- package.lock
cmds:
- yarn add ../tools/upend_js
- yarn install --immutable
dev:update_tool_deps:
cmds:
- task: build:jslib
- cd webui && yarn add ../tools/upend_js && cd ..
- cd webext && yarn add ../tools/upend_js && cd ..
dev:
deps: [dev:backend, dev:frontend]
dev:backend:
2023-04-24 20:25:34 +02:00
dir: cli
cmds:
2023-04-25 21:45:53 +02:00
- cargo run --release -- serve ../example_vault --clean
dev:frontend:
dir: webui
cmds:
2023-05-02 22:35:51 +02:00
- yarn dev --open
clean:
2023-04-23 19:08:56 +02:00
deps: [clean:backend, clean:frontend, clean:tools, clean:vault]
clean:backend:
cmds:
- cargo clean
clean:frontend:
cmds:
- rm -vrf webui/dist webui/public/vendor
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