151 lines
2.8 KiB
YAML
151 lines
2.8 KiB
YAML
# 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]
|
|
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:
|
|
dir: cli
|
|
sources:
|
|
- ./**/Cargo.toml
|
|
- ./**/*.rs
|
|
cmds:
|
|
- cargo build --release
|
|
|
|
build:frontend:
|
|
dir: webui
|
|
deps: [setup:frontend, build:jslib]
|
|
sources:
|
|
- ./**/*.ts
|
|
- ./**/*.svelte
|
|
cmds:
|
|
- yarn build
|
|
|
|
build:jslib:
|
|
dir: tools/upend_js
|
|
sources:
|
|
- ./*.ts
|
|
- ./package.lock
|
|
cmds:
|
|
- yarn install --immutable
|
|
- yarn build
|
|
|
|
setup:frontend:
|
|
dir: webui
|
|
sources:
|
|
- ../tools/upend_js/*.js
|
|
- 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:
|
|
dir: cli
|
|
cmds:
|
|
- cargo run --release -- serve ../example_vault --clean
|
|
|
|
dev:frontend:
|
|
dir: webui
|
|
cmds:
|
|
- yarn dev --open
|
|
|
|
clean:
|
|
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
|
|
|
|
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
|