fix(release): keep owners and grants in production recovery points

Co-Authored-By: Grok (agent loop)
This commit is contained in:
jesse-ux
2026-10-14 21:01:52 +08:00
co-authored by Grok (agent loop)
parent d13250f40a
commit 09906cdccc
13 changed files with 381 additions and 145 deletions
+12
View File
@@ -34,6 +34,18 @@ if [ "$ALLOW_ROLLBACK" != "true" ] && [ "$ALLOW_ROLLBACK" != "false" ]; then
echo "invalid rollback authorization" >&2
exit 1
fi
if [ "$ALLOW_ROLLBACK" = "true" ]; then
recovery_baseline="$DEPLOY_PATH/.state/recovery-baseline.env"
[ -f "$recovery_baseline" ] && [ ! -L "$recovery_baseline" ] || {
echo "recovery format is below 2; dispatch Create production recovery first" >&2
exit 1
}
recovery_format="$(awk -F= '$1 == "RECOVERY_FORMAT" { print $2 }' "$recovery_baseline")"
[[ "$recovery_format" =~ ^[0-9]+$ ]] && (( recovery_format >= 2 )) || {
echo "recovery format is below 2; dispatch Create production recovery first" >&2
exit 1
}
fi
if [ "$VERIFICATION_MODE" != "internal" ] && [ "$VERIFICATION_MODE" != "public" ]; then
echo "invalid production verification mode" >&2
exit 1