deploy: promote gets the verbosity publish got (#1282)
The stable-refresh loop kept a gh call per asset — eight anonymous 'Successfully uploaded 1 asset' lines with no asset names (#1261 fixed publish, missed promote; Paul hit it on the next promote). Assets are now named as they're gathered and pushed in one upload call; the feed-manifest clobber and the releases-page refresh announce themselves too.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+16
−4
deploy/release-server.sh+16 −4
diff --git a/deploy/release-server.sh b/deploy/release-server.sh| index d9e8530..6df6e05 100755 |
| --- a/deploy/release-server.sh |
| +++ b/deploy/release-server.sh |
| @@ -193,7 +193,8 @@ sign_and_upload() { |
| gh release view server -R "$REPO" >/dev/null 2>&1 || \ |
| gh release create server -R "$REPO" --title "Server release feed" --latest=false \ |
| --notes "Rolling release: manifest.json is the channel feed instances update from. See the messenger repo's docs/server-releases.md." |
| - gh release upload server "$TMP/manifest.json" -R "$REPO" --clobber |
| + gh release upload server "$TMP/manifest.json" -R "$REPO" --clobber >/dev/null |
| + echo "release-server: manifest.json clobbered on the rolling release" >&2 |
| "$TOOL" release verify --in "$TMP/manifest.json" |
| # Both publish and promote come through here, so the mirror's feed tracks |
| # every channel move, not just new builds. |
| @@ -213,6 +214,7 @@ sign_and_upload() { |
| # script must pass --latest=false (or --prerelease); this check turns that |
| # mistake from silent breakage into a loud warning on the next release op. |
| refresh_release_page() { |
| + echo "release-server: refreshing the releases-page stack table…" >&2 |
| LATEST_TAG="$(gh api "repos/$REPO/releases/latest" -q .tag_name 2>/dev/null || true)" |
| if [ -n "$LATEST_TAG" ] && ! gh release view "$LATEST_TAG" -R "$REPO" --json assets \ |
| -q '.assets[].name' 2>/dev/null | grep -qx "appcast.xml"; then |
| @@ -399,16 +401,26 @@ promote) |
| # Stable also refreshes the rolling release's "latest stable" binaries — the |
| # fixed, JSON-free URLs deploy/install.sh downloads. |
| if [ "$CHAN" = stable ]; then |
| - echo "promote: refreshing the rolling latest-stable binaries (8 asset copies)…" >&2 |
| mkdir -p "$TMP/stable" |
| + # Download what exists, name it, then push everything in ONE upload call — |
| + # a call per asset printed eight anonymous "Successfully uploaded 1 asset" |
| + # lines (gh never says which), the papercut promote kept after publish |
| + # lost it. |
| + ROLLING="" |
| for A in "$BIN" "$BIN.sha256" "$BIN_ARM" "$BIN_ARM.sha256" \ |
| "$BIN_MAC" "$BIN_MAC.sha256" "$BIN_MAC_X64" "$BIN_MAC_X64.sha256"; do |
| if gh release download "server-$VER" -R "$VREPO" -p "$A" -O "$TMP/stable/$A" 2>/dev/null; then |
| - gh release upload server "$TMP/stable/$A" -R "$REPO" --clobber |
| + ROLLING="$ROLLING $TMP/stable/$A" |
| + echo "promote: $A" >&2 |
| else |
| - echo "note: server-$VER has no $A — rolling copy not refreshed" >&2 |
| + echo "promote: $A — server-$VER has none; rolling copy not refreshed" >&2 |
| fi |
| done |
| + if [ -n "$ROLLING" ]; then |
| + echo "promote: refreshing $(echo "$ROLLING" | wc -w | tr -d ' ') rolling latest-stable assets (one upload)…" >&2 |
| + # shellcheck disable=SC2086 # word-splitting the paths is the point |
| + gh release upload server $ROLLING -R "$REPO" --clobber >/dev/null |
| + fi |
| fi |
| echo "promoted $VER to $CHAN" |
| ;; |