Bind migration heads to coordinated releases
This commit is contained in:
@@ -59,6 +59,11 @@ Core next, and the meta tag last. This is a dependency guarantee for a
|
||||
single-capacity Actions runner: the developer package cannot run before its
|
||||
exact Core and module versions have entered the queue.
|
||||
|
||||
The same release entry point records the reviewed current Alembic heads under
|
||||
the target release version and reruns the strict migration audit before it
|
||||
changes package versions, commits, or tags. A failed baseline check therefore
|
||||
cannot produce a protected package release.
|
||||
|
||||
It builds one wheel and, where applicable, one npm tarball. The workflow records
|
||||
the source tag, source commit, filename, size, and SHA-256 in
|
||||
`package-artifacts.json` before publishing. Gitea rejects a second upload of the
|
||||
|
||||
@@ -29,11 +29,13 @@ class ReleaseEntrypointGateTests(unittest.TestCase):
|
||||
workflow = script[confirm:]
|
||||
|
||||
source_gate = workflow.index("run_version_alignment_gate source")
|
||||
baseline = workflow.index("record_migration_release_baseline")
|
||||
first_commit = workflow.index('run git -C "$repo" commit')
|
||||
lock_generation = workflow.index("generate_release_lock")
|
||||
full_gate = workflow.index("run_version_alignment_gate", source_gate + 1)
|
||||
first_push = workflow.index('run git -C "$repo" push')
|
||||
|
||||
self.assertLess(baseline, source_gate)
|
||||
self.assertLess(source_gate, first_commit)
|
||||
self.assertLess(first_commit, lock_generation)
|
||||
self.assertLess(lock_generation, full_gate)
|
||||
|
||||
@@ -546,6 +546,18 @@ run_migration_release_audit() {
|
||||
run "${command[@]}"
|
||||
}
|
||||
|
||||
record_migration_release_baseline() {
|
||||
local audit_script="$META_ROOT/tools/release/release-migration-audit.py"
|
||||
|
||||
[[ -f "$audit_script" ]] || fail "missing migration audit helper: $audit_script"
|
||||
run "$PYTHON" "$audit_script" \
|
||||
--track release \
|
||||
--record-release "$TARGET_VERSION"
|
||||
if [[ "$DRY_RUN" -eq 0 ]]; then
|
||||
"$PYTHON" "$audit_script" --track release --strict
|
||||
fi
|
||||
}
|
||||
|
||||
print_command() {
|
||||
printf '+'
|
||||
printf ' %q' "$@"
|
||||
@@ -872,6 +884,8 @@ run_manifest_shape_gate
|
||||
|
||||
confirm_release
|
||||
|
||||
record_migration_release_baseline
|
||||
|
||||
for repo in "${PACKAGE_REPOS[@]}"; do
|
||||
if [[ "$DRY_RUN" -eq 1 ]]; then
|
||||
echo "Would update version files in $repo to $TARGET_VERSION"
|
||||
|
||||
Reference in New Issue
Block a user