2021-02-20 12:26:51 +01:00
|
|
|
all: package
|
2020-08-30 23:13:09 +02:00
|
|
|
|
2022-08-01 22:18:28 +02:00
|
|
|
package: backend frontend
|
2020-08-30 23:13:09 +02:00
|
|
|
rm -fr dist
|
2021-06-11 15:07:16 +02:00
|
|
|
linuxdeploy-x86_64.AppImage --appdir dist
|
|
|
|
cp target/release/upend dist/usr/bin/upend
|
2022-01-12 23:16:43 +01:00
|
|
|
cp -r webui/public dist/usr/bin/webui
|
2021-12-20 00:33:46 +01:00
|
|
|
cp media/upend.png dist/usr/share/icons/upend.png
|
2021-06-11 15:07:16 +02:00
|
|
|
VERSION="$$(grep '^version' Cargo.toml|grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')" \
|
|
|
|
linuxdeploy-x86_64.AppImage --appdir dist -d upend.desktop --output appimage
|
2020-08-30 23:13:09 +02:00
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
backend: target/release/upend
|
2020-09-14 01:08:58 +02:00
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
target/release/upend:
|
2020-08-30 23:13:09 +02:00
|
|
|
cargo build --release
|
|
|
|
|
2021-12-05 18:19:45 +01:00
|
|
|
tools/upend_js/index.js:
|
2022-10-16 21:59:11 +02:00
|
|
|
cd tools/upend_js && yarn install --immutable && yarn build
|
2021-11-12 16:34:13 +01:00
|
|
|
|
2022-10-16 21:59:11 +02:00
|
|
|
frontend: webui/dist
|
|
|
|
|
|
|
|
webui/dist: tools/upend_js/index.js
|
|
|
|
cd webui && yarn add ../tools/upend_js && yarn install --immutable && yarn build
|
2020-08-30 23:13:09 +02:00
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
lint: backend_lint frontend_lint
|
|
|
|
|
|
|
|
backend_lint:
|
|
|
|
cargo clippy
|
|
|
|
|
2022-01-28 14:29:43 +01:00
|
|
|
backend_lint_no_default:
|
|
|
|
cargo clippy --no-default-features
|
|
|
|
|
2021-11-12 16:34:13 +01:00
|
|
|
frontend_lint:
|
2022-10-16 21:59:11 +02:00
|
|
|
cd webui && yarn add ../tools/upend_js && yarn install --immutable && yarn check && yarn lint
|
2020-09-02 23:12:13 +02:00
|
|
|
|
2022-01-30 16:52:23 +01:00
|
|
|
frontend_lib_lint:
|
2022-10-16 21:59:11 +02:00
|
|
|
cd tools/upend_js && yarn install --immutable && yarn lint
|
2022-01-30 16:52:23 +01:00
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
backend_test:
|
|
|
|
cargo test --workspace --verbose
|
|
|
|
|
2021-12-27 13:23:23 +01:00
|
|
|
backend_test_no_default:
|
|
|
|
cargo test --no-default-features --workspace --verbose
|
|
|
|
|
2022-10-18 18:16:37 +02:00
|
|
|
clean: clean_tools clean_frontend clean_backend
|
|
|
|
|
|
|
|
clean_tools:
|
2022-10-16 21:59:11 +02:00
|
|
|
rm -vrf tools/upend_js/*.js
|
2020-09-07 13:46:43 +02:00
|
|
|
|
2022-10-18 18:16:37 +02:00
|
|
|
clean_frontend:
|
|
|
|
rm -vrf webui/dist webui/public/vendor
|
|
|
|
|
|
|
|
clean_backend:
|
|
|
|
rm -vrf target
|
|
|
|
|
2020-09-07 13:46:43 +02:00
|
|
|
update_schema:
|
|
|
|
rm -f upend.sqlite3
|
|
|
|
diesel migration run --migration-dir migrations/upend/
|
2022-01-21 17:11:26 +01:00
|
|
|
diesel print-schema > src/database/inner/schema.rs
|