mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
This commit adds a new workspace crate, version, which is consumed by komorebi and komorebic. If either of those binaries are being built by the Nix Flake, the git rev info will be pulled from inputs.self.rev instead of querying the git repo, because the git files are not passed to the derivation. The build.rs for the version crate decides if the build is happening by querying the shadow-rs build output for BRANCH, which will always be empty when a "nix build" is running. Cargo builds will use the standard git information retrieval mechanisms in shadow-rs. The information in both cases is exposed as version::LONG_VERSION, and passed to clap as the string to return when either binary is called with the --version flag.
61 lines
1.8 KiB
Makefile
61 lines
1.8 KiB
Makefile
export RUST_BACKTRACE := "full"
|
|
|
|
fmt:
|
|
test -z "$(rg 'eyre!' --type rust)" || (echo "eyre! macro not allowed"; false)
|
|
test -z "$(rg 'dbg!' --type rust)" || (echo "dbg! macro not allowed"; false)
|
|
test -z "$(rg 'println!' --type rust ./komorebi)" || (echo "println! macro not allowed"; false)
|
|
taplo fmt Cargo.toml */Cargo.toml
|
|
cargo +nightly fmt
|
|
cargo +stable clippy
|
|
alejandra .
|
|
prettier --write README.md
|
|
|
|
fix:
|
|
cargo clippy --fix --allow-dirty
|
|
|
|
clean:
|
|
cargo clean
|
|
|
|
install-with-jsonschema target:
|
|
cargo +stable install --path {{ target }} --locked --target-dir ~/.cargo/bin
|
|
|
|
install target:
|
|
cargo +stable install --path {{ target }} --locked --target-dir ~/.cargo/bin --no-default-features
|
|
|
|
build target:
|
|
cargo +stable build --package {{ target }} --locked --release
|
|
|
|
run target:
|
|
cargo +stable run --bin {{ target }} --locked
|
|
|
|
warn target $RUST_LOG="komorebi=warn":
|
|
just run {{ target }}
|
|
|
|
info target $RUST_LOG="komorebi=info":
|
|
just run {{ target }}
|
|
|
|
debug target $RUST_LOG="komorebi=debug":
|
|
just run {{ target }}
|
|
|
|
trace target $RUST_LOG="komorebi=trace":
|
|
just run {{ target }}
|
|
|
|
deadlock $RUST_LOG="trace":
|
|
cargo +stable run --bin komorebi --locked --no-default-features --features deadlock_detection
|
|
|
|
docgen:
|
|
cargo run --package komorebic -- docgen
|
|
find docs/cli -type f -exec sed -i.bak 's/Usage: /Usage: komorebic /g' {} \; && find docs/cli -name "*.bak" -delete
|
|
|
|
jsonschema:
|
|
cargo run --package komorebic -- static-config-schema > schema.json
|
|
cargo run --package komorebic -- application-specific-configuration-schema > schema.asc.json
|
|
|
|
depgen:
|
|
cargo deny check
|
|
cargo deny list --format json | jq 'del(.unlicensed)' > dependencies.json
|
|
|
|
push:
|
|
git push origin master
|
|
git push komocorp master
|