1
0
mirror of https://github.com/aziascreations/BakaShrot.git synced 2026-11-23 20:58:46 +01:00
Files
BakaShrot/Source/check.ps1
T
aziascreations e044fcf359 Moved the PureBasic version to OldSource/, Started the Rust rewrite in Source/
The rewrite's plan and decisions are in revamp.md. Steps 0 to 10 are done:
the workspace and checks, bakashrot-proto, bakashrot-pki and
bakashrot-cert, bakashrot-config, bakashrot-storage (schema v9), the
server and the client library (every request but replication's,
attachments and retention included), the C DLL with its C, PureBasic and
Python bindings, and the bakashrot tool. Step 11 (replication) is next.

OldSource/ is the old implementation, kept building and passing as the
reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RwFeVTGs2SsufaH6zquzcb
2026-11-14 12:47:40 +01:00

30 lines
1.0 KiB
PowerShell

# Runs what CI runs (../.github/workflows/source.yml), in this order:
# formatting, clippy (warnings are errors), the tests, the docs.
# Exit code 0 when everything passed.
# Usage: powershell -ExecutionPolicy Bypass -File Source\check.ps1
$ErrorActionPreference = "Stop"
# rustup's folder isn't always on the PATH (it isn't in every shell here).
if (-not (Get-Command cargo -ErrorAction SilentlyContinue)) {
$env:PATH = (Join-Path $env:USERPROFILE ".cargo\bin") + [IO.Path]::PathSeparator + $env:PATH
}
function Step([string]$What, [scriptblock]$Run) {
"== $What"
& $Run
if ($LASTEXITCODE -ne 0) { "FAILED: $What"; exit 1 }
}
Push-Location $PSScriptRoot
try {
Step "cargo fmt" { cargo fmt --all -- --check }
Step "cargo clippy" { cargo clippy --workspace --all-targets --all-features -- -D warnings }
Step "cargo test" { cargo test --workspace --all-features }
$env:RUSTDOCFLAGS = "-D warnings"
Step "cargo doc" { cargo doc --workspace --no-deps --all-features }
} finally {
Pop-Location
}
"All checks passed"
exit 0