- bump View product version to 0.2.0 (Cargo.toml, Cargo.lock, tool.json, CLI) - move all maintenance scripts from tools/ to scripts/ per RFC-0002 §5.3 - add scripts/verify-frozen-cli.sh: records version/SHA and fails if the frozen CLI changes across a command sequence - add .github/workflows/ci.yml: quality lane + frozen-CLI acceptance lane with archive SHA verification and evidence upload; update .woodpecker.yml paths - record PR-01 black-box evidence: tool install/list/view --help/version, tamper rejection, tool remove, frozen CLI SHA unchanged
43 lines
1.3 KiB
Bash
Executable File
43 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Install the built bundle with a frozen marqdo CLI into an isolated tool home,
|
|
# then prove the command is served by this program (not by the Core).
|
|
#
|
|
# Usage: MARQDO_BIN=/abs/path/marqdo scripts/install-smoke.sh [tool.json]
|
|
set -euo pipefail
|
|
|
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
manifest="${1:-$repo_root/dist/marqdo-view/tool.json}"
|
|
|
|
: "${MARQDO_BIN:?set MARQDO_BIN to the frozen marqdo binary}"
|
|
|
|
if [[ ! -x "$MARQDO_BIN" ]]; then
|
|
echo "error: MARQDO_BIN is not executable: $MARQDO_BIN" >&2
|
|
exit 1
|
|
fi
|
|
before="$(sha256sum "$MARQDO_BIN" | cut -d' ' -f1)"
|
|
|
|
mkdir -p "$repo_root/dist"
|
|
tool_home="$(mktemp -d "$repo_root/dist/smoke-tool-home.XXXXXX")"
|
|
cleanup() {
|
|
rm -rf "$tool_home"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
export MARQDO_TOOL_HOME="$tool_home"
|
|
"$MARQDO_BIN" tool install "$manifest" >/dev/null
|
|
"$MARQDO_BIN" tool list | grep -q 'view'
|
|
help="$("$MARQDO_BIN" view --help)"
|
|
grep -q 'marqdo-view' <<<"$help"
|
|
grep -q 'export' <<<"$help"
|
|
grep -q 'verify' <<<"$help"
|
|
version="$("$MARQDO_BIN" view --version)"
|
|
grep -q 'marqdo-view' <<<"$version"
|
|
|
|
after="$(sha256sum "$MARQDO_BIN" | cut -d' ' -f1)"
|
|
if [[ "$before" != "$after" ]]; then
|
|
echo "error: frozen core binary changed during install smoke test" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "install-smoke: PASS (core sha256 $before unchanged, tool home $tool_home)"
|