File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,21 @@ if [ -n "$ESBUILD_PKGS" ] && ! echo "$ESBUILD_PKGS" | grep -q "darwin-${EXPECT_N
5353 exit 1
5454fi
5555
56+ # Stamp the shipped product.json with the LevelCode *release* commit, not the Code-OSS clone's.
57+ # gulp's getVersion() prefers $BUILD_SOURCEVERSION when it's a full 40-hex sha; otherwise it falls back
58+ # to vscode/.git HEAD — the pinned upstream Code-OSS commit, which is IDENTICAL for every LevelCode build
59+ # from tag $VSCODE_TAG. A shared commit across releases breaks the self-update up-to-date check
60+ # (GET /api/update/:target/:quality/:commit compares this exact value), so the app can never tell one
61+ # LevelCode release from the next. Use the LevelCode repo HEAD → each release reports a distinct commit;
62+ # set the same sha as the release's `commit` in the thin.ly update feed (LEVELCODE_UPDATE_FEED).
63+ if LC_COMMIT=" $( git -C " $ROOT_DIR " rev-parse HEAD 2> /dev/null) " && [ " ${# LC_COMMIT} " -eq 40 ]; then
64+ export BUILD_SOURCEVERSION=" $LC_COMMIT "
65+ echo " [build] Stamping product.json commit = $LC_COMMIT (LevelCode repo HEAD)."
66+ else
67+ echo " [build] WARN: could not resolve a 40-char LevelCode repo commit — product.json will fall back to"
68+ echo " [build] the Code-OSS clone commit, which is shared across releases (breaks self-update)."
69+ fi
70+
5671echo " [build] Compiling production build for $ARCH …"
5772npm run gulp -- " $GULP_TARGET "
5873
You can’t perform that action at this time.
0 commit comments