f3-rs/Makefile
Aravinth Manivannan e9e6a96223
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: configure git
2023-01-02 22:25:10 +05:30

48 lines
1.5 KiB
Makefile

default: ## Debug build
cargo build
check: ## Check for syntax errors on all workspaces
cargo check --workspace --tests --all-features
ci-deploy: ## Deploy from CI/CD. Only call from within CI
@if [ "${CI}" != "woodpecker" ]; \
then echo "Only call from within CI. Will re-write your local Git configuration. To override, set export CI=woodpecker"; \
exit 1; \
fi
git config --global user.email "${CI_COMMIT_AUTHOR_EMAIL}"
git config --global user.name "${CI_COMMIT_AUTHOR}"
./scripts/ci.sh --init "$$GITEA_WRITE_DEPLOY_KEY"
./scripts/ci.sh --deploy librepages dist "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>"
#./scripts/ci.sh --deploy librepages dist
./scripts/ci.sh --clean
clean: ## Clean all build artifacts and dependencies
@cargo clean
coverage: ## Generate HTML code coverage
cargo tarpaulin -t 1200 --out Html
dev-env: ## Download development dependencies
cargo fetch
doc: ## Prepare documentation
cargo doc --no-deps --workspace --all-features
rm -rf dist || true && cp -r ./target/doc/ dist/
lint: ## Lint codebase
cargo fmt -v --all -- --emit files
cargo clippy --workspace --tests --all-features
release: ## Release build
cargo build --release
test: ## Run tests
cargo test --all-features --no-fail-fast
xml-test-coverage: ## Generate cobertura.xml test coverage
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}'