Distinguish production tags from complete diagnostic tags
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user