upend/Taskfile.yml
Tomáš Mládek 1067c29c42
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci: nightly builds
Squashed commit of the following:

commit cf9766b3b7a885a508d8941f40a745cd230e1c65
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 20:35:31 2023 +0200

    ci: upload to nightly

commit e5b5c9d95f850f736fce0b537685618ddf9eb772
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 20:35:02 2023 +0200

    ci: verbose

commit 566bbe0627
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 20:09:55 2023 +0200

    ci: fix glob quoting (?)

commit e52824ce1c
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 19:39:05 2023 +0200

    fix: quoted variables in publish step

commit 0cb9651aba
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 16:36:48 2023 +0200

    wip: secrets sanity check

commit cc4cb206ef
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 16:08:17 2023 +0200

    wip, ci: remove quoting from publish commands?

commit 2e0d7f3275
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 15:25:15 2023 +0200

    ci, fix: use upend-* images

commit 65fc232cdf
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 14:41:53 2023 +0200

    ci: libssl-dev not needed

commit 8d0387175a
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 14:41:47 2023 +0200

    ci: pull before building dockers

commit 3a70483188
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 14:41:28 2023 +0200

    ci: use `rust:bookworm`

commit 5a4187b04b
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 13:49:53 2023 +0200

    fix, ci: forgotten git in upend-deploy

commit fec2bbd97f
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 13:26:23 2023 +0200

    fix, ci: woodpecker env var substitution

commit 2b3ad2eb74
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 13:08:51 2023 +0200

    ci, fix: single CARGO_HOME

commit c94e239a06
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 12:08:52 2023 +0200

    ci: per-build caching

commit b751b63c42
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 11:56:20 2023 +0200

    ci, fix: add missing dependencies

commit 8d3c10a5d8
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Aug 12 09:20:02 2023 +0200

    ci, fix: add git to deploy image

commit 45fa7a5fe7
Author: Tomáš Mládek <t@mldk.cz>
Date:   Fri Aug 11 23:46:37 2023 +0200

    ci: move deploy docker to debian

commit e862dd17f6
Author: Tomáš Mládek <t@mldk.cz>
Date:   Fri Aug 11 19:04:43 2023 +0200

    ci: fix package stage

commit f5b87d31c0
Author: Tomáš Mládek <t@mldk.cz>
Date:   Fri Aug 11 18:31:08 2023 +0200

    ci: build & deploy nightlies
2023-08-12 20:36:32 +02:00

214 lines
4.4 KiB
YAML

# https://taskfile.dev
version: "3"
tasks:
default:
cmds:
- task: lint
- task: test
- task: build
package:
cmds:
- rm -fr dist
- linuxdeploy-x86_64.AppImage --appdir dist
- cp -v target/release/upend-cli 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 build/upend.desktop --output appimage
env:
LINUXDEPLOY_OUTPUT_VERSION:
sh: ./build/get_version.sh
lint:
deps: [lint:frontend, lint:backend, lint:jslib, lint:webext]
lint:frontend:
dir: webui
deps: [setup:frontend]
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
- pnpm check
- pnpm lint
lint:backend:
sources:
- ./**/Cargo.toml
- ./**/*.rs
cmds:
- cargo clippy --workspace
lint:jslib:
deps: [build:jslib]
dir: tools/upend_js
sources:
- ./*.ts
- ./package.lock
cmds:
- pnpm lint
lint:webext:
dir: webext
deps: [setup:webext]
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
- pnpm lint
test:
deps: [test:backend]
test:backend:
sources:
- ./**/Cargo.toml
- ./**/*.rs
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]
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
- pnpm build
build:jslib:
deps: [build:wasmlib]
dir: tools/upend_js
sources:
- ./*.ts
- ./package.lock
cmds:
- pnpm add upend_wasm@file:../upend_wasm/pkg
- pnpm install --frozen-lockfile
- pnpm build
build:wasmlib:
dir: tools/upend_wasm
sources:
- ./**/*.rs
- Cargo.toml
cmds:
- wasm-pack build --target web
setup:frontend:
deps: [build:jslib]
dir: webui
sources:
- ../tools/upend_js/*.js
- package.lock
cmds:
- pnpm add upend@file:../tools/upend_js
- pnpm install --frozen-lockfile
build:webext:
deps: [setup:webext]
dir: webext
sources:
- ./**/*.ts
- ./**/*.svelte
cmds:
- 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:
deps: [build:jslib]
dir: webext
sources:
- ../tools/upend_js/*.js
- package.lock
cmds:
- pnpm install --frozen-lockfile
build:docker:
deps: [build:docker:node, build:docker:rust, build:docker:deploy]
build:docker:node:
dir: build/upend-node
cmds:
- docker build --pull -t upend-node -t localhost:5000/upend-node .
build:docker:rust:
dir: build/upend-rust
cmds:
- docker build --pull -t upend-rust -t localhost:5000/upend-rust .
build:docker:deploy:
dir: build/upend-deploy
cmds:
- docker build --pull -t upend-deploy -t localhost:5000/upend-deploy .
dev:update_tool_deps:
cmds:
- task: build:jslib
- cd webui && pnpm add upend@file:../tools/upend_js && cd ..
- cd webext && pnpm install && cd ..
dev:
deps: [dev:backend, dev:frontend]
dev:backend:
dir: cli
cmds:
- cargo run --release -- serve ../example_vault --clean --no-browser --reinitialize
dev:frontend:
dir: webui
cmds:
- pnpm dev --open
clean:
deps:
[clean:backend, clean:frontend, clean:webext, clean:tools, clean:vault]
clean:backend:
cmds:
- cargo clean
clean:frontend:
cmds:
- rm -rf webui/node_modules
- rm -vrf webui/dist webui/public/vendor
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
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