120 lines
2.2 KiB
YAML
120 lines
2.2 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]
|
|
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:backend:
|
|
dir: server
|
|
sources:
|
|
- ./**/Cargo.toml
|
|
- ./**/*.rs
|
|
cmds:
|
|
- cargo build --release
|
|
|
|
build:frontend:
|
|
dir: webui
|
|
deps: [setup:frontend, build:jslib]
|
|
cmds:
|
|
- yarn build
|
|
|
|
build:jslib:
|
|
dir: tools/upend_js
|
|
sources:
|
|
- ../tools/upend_js/*
|
|
cmds:
|
|
- yarn install --immutable
|
|
- yarn build
|
|
|
|
setup:frontend:
|
|
dir: webui
|
|
sources:
|
|
- ../tools/upend_js/*.js
|
|
- webui/package.json
|
|
cmds:
|
|
- yarn add ../tools/upend_js
|
|
- yarn install --immutable
|
|
|
|
dev:
|
|
deps: [dev:backend, dev:frontend]
|
|
|
|
dev:backend:
|
|
dir: server
|
|
cmds:
|
|
- cargo run --release -- ../example_vault --clean
|
|
|
|
dev:frontend:
|
|
dir: webui
|
|
cmds:
|
|
- yarn dev
|
|
|
|
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
|