forms/Makefile

60 lines
1.7 KiB
Makefile
Raw Normal View History

2022-09-07 13:06:03 +05:30
default: ## Build app in debug mode
cargo build
check: ## Check for syntax errors on all workspaces
cargo check --workspace --tests --all-features
cd env/libforms && cargo check --workspace --tests --all-features
2022-09-07 13:06:03 +05:30
clean: ## Delete build artifacts
@cargo clean
coverage: ## Generate code coverage report in HTML format
2022-09-07 13:06:03 +05:30
$(call cache_bust)
cargo tarpaulin -t 1200 --out Html
doc: ## Generate documentation
#yarn doc
cargo doc --no-deps --workspace --all-features
docker: ## Build Docker image
2022-09-08 17:56:28 +05:30
docker build -t realaravinth/librepages-forms:master -t realaravinth/librepages-forms:latest .
2022-09-07 13:06:03 +05:30
docker-publish: docker ## Build and publish Docker image
2022-09-08 17:56:28 +05:30
docker push realaravinth/librepages-forms:master
docker push realaravinth/librepages-forms:latest
2022-09-07 13:06:03 +05:30
env: ## Setup development environtment
cargo fetch
lint: ## Lint codebase
cargo fmt -v --all -- --emit files
cargo clippy --workspace --tests --all-features
cd env/libforms && cargo fmt -v --all -- --emit files
cd env/libforms && cargo clippy --workspace --tests --all-features
2022-09-07 13:06:03 +05:30
migrate: ## run migrations
unset DATABASE_URL && cargo build
cargo run -- migrate
2022-09-07 13:06:03 +05:30
release: ## Build app with release optimizations
cargo build --release
run: ## Run app in debug mode
cargo run
sqlx-offline-data: ## prepare sqlx offline data
cargo sqlx prepare \
--database-url=${POSTGRES_DATABASE_URL} -- \
--all-features
2022-09-07 13:06:03 +05:30
test: ## Run all available tests
cargo test --no-fail-fast
xml-test-coverage: ## Generate code coverage report in XML format
cargo tarpaulin -t 1200 --out Xml
help: ## Prints help for targets with comments
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'