2021-05-03 17:54:03 +03:00
|
|
|
default: frontend
|
2021-04-08 13:19:55 +03:00
|
|
|
cargo build
|
|
|
|
|
2021-07-06 21:58:32 +03:00
|
|
|
run: frontend
|
2021-04-08 13:19:55 +03:00
|
|
|
cargo run
|
|
|
|
|
|
|
|
dev-env:
|
|
|
|
cargo fetch
|
2021-04-09 11:51:43 +03:00
|
|
|
yarn install
|
2021-04-08 13:19:55 +03:00
|
|
|
|
2021-07-06 21:58:32 +03:00
|
|
|
doc:
|
|
|
|
#yarn doc
|
2021-04-08 13:19:55 +03:00
|
|
|
cargo doc --no-deps --workspace --all-features
|
2021-07-06 21:58:32 +03:00
|
|
|
cd browser && cargo doc --no-deps --workspace --all-features
|
2021-04-09 12:33:50 +03:00
|
|
|
|
2021-05-03 17:54:03 +03:00
|
|
|
frontend:
|
2021-07-06 21:58:32 +03:00
|
|
|
cd browser && wasm-pack build --release
|
|
|
|
yarn install
|
2021-04-09 11:51:43 +03:00
|
|
|
yarn build
|
2021-04-08 13:19:55 +03:00
|
|
|
|
2021-07-06 21:58:32 +03:00
|
|
|
test: migrations
|
|
|
|
cd browser && wasm-pack test --release --headless --chrome
|
|
|
|
cd browser && wasm-pack test --release --headless --firefox
|
|
|
|
cargo test --all --all-features --no-fail-fast
|
|
|
|
${MAKE} frontend-test
|
|
|
|
|
|
|
|
frontend-test:
|
|
|
|
cd browser && wasm-pack test --release --headless --chrome
|
|
|
|
cd browser && wasm-pack test --release --headless --firefox
|
|
|
|
yarn test
|
2021-04-08 13:19:55 +03:00
|
|
|
|
2021-07-06 21:58:32 +03:00
|
|
|
a:
|
|
|
|
echo a
|
|
|
|
b:
|
|
|
|
${MAKE} a
|
|
|
|
|
|
|
|
xml-test-coverage: migrations
|
|
|
|
cd browser && cargo tarpaulin -t 1200 --out Xml
|
2021-04-08 13:19:55 +03:00
|
|
|
cargo tarpaulin -t 1200 --out Xml
|
|
|
|
|
2021-07-06 21:58:32 +03:00
|
|
|
coverage: migrations
|
|
|
|
cd browser && cargo tarpaulin -t 1200 --out Html
|
2021-04-08 13:19:55 +03:00
|
|
|
cargo tarpaulin -t 1200 --out Html
|
|
|
|
|
2021-05-03 17:54:03 +03:00
|
|
|
release: frontend
|
2021-04-08 13:19:55 +03:00
|
|
|
cargo build --release
|
|
|
|
|
|
|
|
clean:
|
|
|
|
cargo clean
|
|
|
|
yarn clean
|
|
|
|
|
2021-07-04 23:52:02 +03:00
|
|
|
docker-build:
|
|
|
|
docker build -t mcaptcha/mcaptcha:master -t mcaptcha/mcaptcha:latest .
|
2021-07-06 21:58:32 +03:00
|
|
|
|
2021-07-04 23:52:02 +03:00
|
|
|
docker-publish: docker-build
|
|
|
|
docker push mcaptcha/mcaptcha:master
|
|
|
|
docker push mcaptcha/mcaptcha:latest
|
|
|
|
|
2021-07-06 21:58:32 +03:00
|
|
|
migrations:
|
2021-04-08 13:19:55 +03:00
|
|
|
cargo run --bin tests-migrate
|
|
|
|
|
|
|
|
help:
|
2021-07-04 23:52:02 +03:00
|
|
|
@echo ' clean - drop builds and environments'
|
|
|
|
@echo ' coverage - build test coverage in HTML format'
|
|
|
|
@echo ' dev-env - download dependencies'
|
|
|
|
@echo ' docker-build - build docker image'
|
|
|
|
@echo ' docker-publish - build and publish docker image'
|
2021-07-06 21:58:32 +03:00
|
|
|
@echo ' doc - build documentation'
|
2021-05-04 08:00:22 +03:00
|
|
|
@echo ' frontend - build static assets in prod mode'
|
2021-07-06 21:58:32 +03:00
|
|
|
@echo ' frontend-test - run frontend tests'
|
|
|
|
@echo ' migrations - run database migrations'
|
2021-07-04 23:52:02 +03:00
|
|
|
@echo ' run - run developer instance'
|
|
|
|
@echo ' test - run unit and integration tests'
|
2021-05-03 17:54:03 +03:00
|
|
|
@echo ' xml-coverage - build test coverage in XML for upload to codecov'
|
2021-04-08 13:19:55 +03:00
|
|
|
@echo ''
|