2021-02-20 12:26:51 +01:00
|
|
|
all: package
|
2020-08-30 23:13:09 +02:00
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
package: target/release/upend ui/dist/index.html
|
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
|
2021-12-02 22:37:51 +01:00
|
|
|
cp -r ui/public dist/usr/bin/webui
|
2021-06-11 15:07:16 +02:00
|
|
|
cp upend.png dist/usr/share/icons/upend.png
|
|
|
|
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-11-12 16:34:13 +01:00
|
|
|
tools_upend_js:
|
|
|
|
cd tools/upend_js && yarn install && yarn build
|
|
|
|
|
2021-04-05 22:08:19 +02:00
|
|
|
frontend: ui/dist/index.html
|
2020-09-14 01:08:58 +02:00
|
|
|
|
2021-11-12 16:34:13 +01:00
|
|
|
ui/dist/index.html: tools_upend_js
|
2021-12-02 22:25:25 +01:00
|
|
|
cd ui && yarn add ../tools/upend_js && yarn install && 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
|
|
|
|
|
2021-11-12 16:34:13 +01:00
|
|
|
frontend_lint:
|
|
|
|
cd ui && yarn instlal && yarn lint
|
2020-09-02 23:12:13 +02:00
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
backend_test:
|
|
|
|
cargo test --workspace --verbose
|
|
|
|
|
2020-08-30 23:13:09 +02:00
|
|
|
clean:
|
2021-11-12 16:34:13 +01:00
|
|
|
rm -vr target
|
|
|
|
rm -vr ui/dist
|
2020-09-07 13:46:43 +02:00
|
|
|
|
|
|
|
update_schema:
|
|
|
|
rm -f upend.sqlite3
|
|
|
|
diesel migration run --migration-dir migrations/upend/
|
|
|
|
diesel print-schema > src/schema.rs
|