Files
termscp/just/code_check.just
T
Christian Visintin 133ec898d8 ci(release): build Linux artifacts as static musl binaries (#447)
Build Linux release artifacts as statically linked musl binaries for x86_64 and aarch64, update packaging and updater handling, and document the reduced runtime requirements.

Keep release version preparation locked without refreshing dependencies or committing Cargo.lock.

Closes #440
2026-09-03 13:31:16 +02:00

55 lines
1.7 KiB
Plaintext

alias lint := clippy
# Format all sources (Markdown, TOML, YAML and Rust via nightly rustfmt) with dprint
[group('code_check')]
fmt args="":
dprint fmt {{ args }}
# Check formatting of all sources with dprint (no writes)
[group('code_check')]
fmt_check args="":
dprint check {{ args }}
# Run clippy on all targets
[group('code_check')]
clippy args="":
cargo clippy --workspace --all-targets {{ args }}
# Build the crate documentation, denying warnings
[group('code_check')]
doc args="":
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps {{ args }}
# Check dependencies for advisories, licenses, bans and sources (cargo-deny)
[group('code_check')]
deny args="":
cargo deny check {{ args }}
# Point git at the tracked .githooks directory (installs the pre-commit hook)
[group('code_check')]
setup_githooks:
git config core.hooksPath .githooks
@echo "git hooks installed: core.hooksPath = .githooks"
# Lint the install scripts (shellcheck; PowerShell parse when pwsh is available)
[group('code_check')]
check_install_scripts:
sh -n install.sh
sh -n dist/release/build_musl.sh
sh -n dist/release/build_musl_container.sh
shellcheck install.sh dist/release/build_musl.sh dist/release/build_musl_container.sh
@if command -v pwsh >/dev/null 2>&1; then \
pwsh -NoProfile -Command '$t = $null; $e = $null; $null = [System.Management.Automation.Language.Parser]::ParseFile("install.ps1", [ref]$t, [ref]$e); if ($e) { $e; exit 1 }'; \
else \
echo "pwsh not found: skipping install.ps1 parse check"; \
fi
# Run all code checks. Fails if any check fails
[group('code_check')]
check_code:
just fmt_check
just clippy "-- -D warnings"
just doc
just deny
just check_install_scripts