Distinguish production tags from complete diagnostic tags

This commit is contained in:
2026-12-06 03:21:39 +00:00
parent 0205f32f28
commit d5154cf59d
11 changed files with 155 additions and 10 deletions

View File

@@ -21,11 +21,15 @@ if [ "$mode" = tag ]; then
diagnostic=${value#releasekit-test/}
selector=${diagnostic%%/*}
attempt=${diagnostic#*/}
case "$diagnostic" in */*) ;; *) echo "invalid diagnostic tag" >&2; exit 2 ;; esac
case "$attempt" in *[!0-9a-f]*|'') echo "invalid diagnostic attempt" >&2; exit 2 ;; esac
[ "${#attempt}" -eq 32 ] && [ -n "$selector" ] || { echo "invalid diagnostic tag" >&2; exit 2; }
mode=selector
value=$selector
case "$attempt" in
*[!0-9a-f]*|'') ;;
*)
if [ "${#attempt}" -eq 32 ] && [ -n "$selector" ] && [ "$diagnostic" != "$attempt" ]; then
mode=selector
value=$selector
fi
;;
esac
;;
esac
fi