Files
marqdo-knowledge 835f61dc01 ci: align release tooling with the upstream deterministic pipeline
- add tools/release/package.py: sorted, commit-timestamped, uid/gid-normalised
  deterministic archive; refuses dirty trees, source-SHA mismatch and stale
  versions; emits SOURCE_SHA, FILES.sha256 and RELEASE_INFO.json with binaries,
  protocol revisions, core baseline and manifest digest
- add tools/release/smoke.py: verifies checksum/manifest/source/version then
  cold-installs the archive through a real core CLI into an isolated
  MARQDO_TOOL_HOME and exercises help/compile/query/check/remove, writing smoke
  evidence
- add tools/ci/test_release_metadata.py: single CI gate for version/fact
  consistency across Cargo files, tool.json, spec, CHANGELOG, release notes,
  README and CI configuration
- Woodpecker and GitHub pipelines now run the metadata gate and use the Python
  packager/smoke test in the tag-only release lane; shell release scripts are
  thin wrappers; docs/ci.md and docs/releasing.md document gates and non-gates
2026-11-26 09:05:27 +08:00

17 lines
627 B
Bash
Executable File

#!/bin/sh
# Thin wrapper around the deterministic Python packager.
#
# SOURCE_SHA=<40-hex> scripts/package-release.sh [--out-dir dist]
#
# Requires a clean tree matching HEAD, a locked release build in
# target/release/marqdo-knowledge and the version declared in Cargo.toml.
set -eu
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' "$ROOT/Cargo.toml" | head -1)
SOURCE_SHA=${SOURCE_SHA:-$(git -C "$ROOT" rev-parse HEAD)}
OUT_DIR=${OUT_DIR:-dist}
python3 "$ROOT/tools/release/package.py" \
--source-sha "$SOURCE_SHA" \
--version "$VERSION" \
--out-dir "$OUT_DIR"