Skip to content

Commit 034c41e

Browse files
Adam Fiskclaude
andcommitted
ci: don't bump patch for nightly builds
Nightlies now reuse the latest tagged base version. Uniqueness still comes from the SHA+timestamp suffix and from CFBundleVersion (github.run_number). Why: macOS pins system-extension upgrade/downgrade decisions on CFBundleShortVersionString. With the old behavior, a nightly built right after v9.1.9-beta advertised CFBundleShortVersionString 9.1.10. Users who installed that nightly and then reverted to the v9.1.9-beta DMG triggered the OS downgrade path, which returned OSSystemExtensionErrorDomain code 4 (extensionNotFound) and bricked the network extension on retry — reproduced as bug #5 in engineering#3474 (Ryan). Keeping the nightly base equal to the latest beta/prod base makes the beta ↔ nightly transition a same-version content change. The reconciler in #8745/#8751 already handles that case correctly via .deactivateThenActivate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 41ae88c commit 034c41e

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

scripts/ci/version.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ set -euo pipefail
1313
# Examples:
1414
# version.sh validate v1.2.3 → 1.2.3
1515
# version.sh validate v1.2.3-beta → 1.2.3-beta
16-
# version.sh generate nightly → 1.2.4-abc123-20260206T120000Z
16+
# version.sh generate nightly → 1.2.3-abc123-20260206T120000Z
17+
# version.sh generate beta → 1.2.4-beta
1718
# version.sh extract 1.2.3-beta → 1.2.3
1819

1920
COMMAND="${1:?Command required: validate, generate, or extract}"
@@ -126,12 +127,23 @@ generate)
126127
exit 1
127128
fi
128129

130+
# Nightlies reuse the latest tagged base version — they do NOT bump the
131+
# patch. Uniqueness comes from the SHA+timestamp suffix in the tag, and
132+
# from CFBundleVersion (github.run_number) at pubspec-write time.
133+
#
134+
# Why: macOS pins system-extension upgrade/downgrade decisions on
135+
# CFBundleShortVersionString. If a nightly advertises a higher base
136+
# than the latest beta (e.g. beta 9.1.9 → nightly 9.1.10), a user who
137+
# tests the nightly and then reverts to the beta hits the OS downgrade
138+
# path, which returns OSSystemExtensionErrorDomain code 4 and bricks
139+
# the network extension. Keeping the base equal makes the transition
140+
# a same-version content change, which the reconciler handles via
141+
# .deactivateThenActivate. See engineering#3474 bug #5.
129142
BASELINE=$(max_semver "${PROD:-0.0.0}" "${BETA:-0.0.0}")
130-
NEXT=$(increment_patch "$BASELINE")
131143
SHA=$(git rev-parse --short=7 HEAD)
132144
TIMESTAMP=$(date -u +%Y%m%dT%H%M%SZ)
133145

134-
echo "${NEXT}-${SHA}-${TIMESTAMP}"
146+
echo "${BASELINE}-${SHA}-${TIMESTAMP}"
135147
;;
136148

137149
beta)

0 commit comments

Comments
 (0)