@futurelastic/colab-handbook 1.12.0-rc.24 → 1.12.0-rc.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -584,12 +584,17 @@ jobs:
|
|
|
584
584
|
run: |
|
|
585
585
|
set -uo pipefail
|
|
586
586
|
VERSION="${TAG#v}"
|
|
587
|
+
# Boundary-aware, the same rule as deploy-container-run.mjs `reportsVersion` (#459): the
|
|
588
|
+
# version (optionally `v`-prefixed) must not touch a digit or `.` before it, nor a digit or
|
|
589
|
+
# `.`+digit after it — so 1.2.1 never matches 1.2.10, 11.2.1 or 1.2.1.4. A substring
|
|
590
|
+
# `case` match accepted all three. grep is line-based; a newline is neither, so it agrees.
|
|
591
|
+
PATTERN="(^|[^0-9.])v?${VERSION//./\\.}([^0-9.]|\\.([^0-9]|\$)|\$)"
|
|
587
592
|
DEADLINE=$(( $(date +%s) + HEALTH_TIMEOUT_SECONDS ))
|
|
588
593
|
while :; do
|
|
589
594
|
BODY="$(curl -fsS --max-time 10 "$HEALTH_URL" 2> /dev/null || true)"
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
595
|
+
if printf '%s\n' "$BODY" | grep -Eq -- "$PATTERN"; then
|
|
596
|
+
echo "$HEALTH_URL reports $VERSION — $TAG is live" | tee -a "$GITHUB_STEP_SUMMARY"; exit 0
|
|
597
|
+
fi
|
|
593
598
|
if [ "$(date +%s)" -ge "$DEADLINE" ]; then
|
|
594
599
|
echo "::error::$HEALTH_URL did not report $VERSION within ${HEALTH_TIMEOUT_SECONDS}s — the deploy's own rollback should have restored the previous version; $TAG stays tagged"
|
|
595
600
|
exit 1
|