Skip to content

Commit 4797681

Browse files
committed
Update commit environment variable
This was causing the commit not to be set. It broke display languages since that has a hard dependency on the commit for directory names. Possibly broke other things.
1 parent 3e2743d commit 4797681

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

ci/build/build-vscode.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ copy-bin-script() {
1515
local dest="lib/vscode-reh-web-linux-x64/bin/$script"
1616
cp "lib/vscode/resources/server/bin/$script" "$dest"
1717
sed -i.bak "s/@@VERSION@@/$(vscode_version)/g" "$dest"
18-
sed -i.bak "s/@@COMMIT@@/$VSCODE_DISTRO_COMMIT/g" "$dest"
18+
sed -i.bak "s/@@COMMIT@@/$BUILD_SOURCEVERSION/g" "$dest"
1919
sed -i.bak "s/@@APPNAME@@/code-server/g" "$dest"
2020

2121
# Fix Node path on Darwin and Linux.
@@ -51,8 +51,8 @@ main() {
5151
# Set the commit Code will embed into the product.json. We need to do this
5252
# since Code tries to get the commit from the `.git` directory which will fail
5353
# as it is a submodule.
54-
export VSCODE_DISTRO_COMMIT
55-
VSCODE_DISTRO_COMMIT=$(git rev-parse HEAD)
54+
#export BUILD_SOURCEVERSION
55+
#BUILD_SOURCEVERSION=$(git rev-parse HEAD)
5656

5757
# Add the date, our name, links, and enable telemetry (this just makes
5858
# telemetry available; telemetry can still be disabled by flag or setting).
@@ -109,6 +109,15 @@ EOF
109109

110110
popd
111111

112+
pushd lib/vscode-reh-web-linux-x64
113+
# Make sure Code took the version we set in the environment variable. Not
114+
# having a version will break display languages.
115+
if ! jq -e .commit product.json ; then
116+
echo "'commit' is missing from product.json"
117+
exit 1
118+
fi
119+
popd
120+
112121
# These provide a `code-server` command in the integrated terminal to open
113122
# files in the current instance.
114123
delete-bin-script remote-cli/code-server

0 commit comments

Comments
 (0)