upend/Makefile
Tomáš Mládek 4c1034ee4b enable CI build for the whole app
Squashed commit of the following:

commit 9f767769ffd1887964e3294d47a043672208810d
Author: Tomáš Mládek <tmladek@protonmail.ch>
Date:   Sat Feb 20 11:51:20 2021 +0100

    update Makefile dependencies

commit 535689b90ea2061854082dda0381f03358f66fc9
Author: Tomáš Mládek <tmladek@protonmail.ch>
Date:   Sat Feb 20 11:02:24 2021 +0100

    build stage produces artifacts

commit 6841e1983141d99b30854430d6a9a6f9353ab9ac
Author: Tomáš Mládek <t@mldk.cz>
Date:   Sat Feb 20 10:58:10 2021 +0100

    install clippy, disable frontend lint for now

commit 778dec8436da536a2c76d9e34624bbbc47eee710
Author: Tomáš Mládek <tmladek@protonmail.ch>
Date:   Sat Feb 20 10:27:44 2021 +0100

    fix makefile (?)

commit b43ab42098bac0af4499a2b0e830c32cdcdcae52
Author: Tomáš Mládek <tmladek@protonmail.ch>
Date:   Sat Feb 20 10:25:38 2021 +0100

    CI test, build whole package
2021-02-20 12:39:19 +01:00

40 lines
708 B
Makefile

all: package
package: target/release/upend ui/dist/index.html
rm -fr dist
mkdir dist
cp target/release/upend dist/upend
cp -r ui/dist dist/webui
backend: target/release/upend
target/release/upend:
cargo build --release
frontend: ui/node_modules ui/dist/index.html
ui/dist/index.html:
cd ui && npm run build
lint: backend_lint frontend_lint
backend_lint:
cargo clippy
frontend_lint: ui/node_modules
cd ui && npm run lint
backend_test:
cargo test --workspace --verbose
ui/node_modules:
cd ui && npm install
clean:
rm -r target
rm -r ui/node_modules ui/dist
update_schema:
rm -f upend.sqlite3
diesel migration run --migration-dir migrations/upend/
diesel print-schema > src/schema.rs