mirror of
https://github.com/coder/code-server.git
synced 2026-09-11 04:10:33 +02:00
Fix the windows arms of the release build scripts (#7986)
This commit is contained in:
@@ -25,7 +25,7 @@ main() {
|
|||||||
|
|
||||||
release_archive() {
|
release_archive() {
|
||||||
local release_name="code-server-$VERSION-$OS-$ARCH"
|
local release_name="code-server-$VERSION-$OS-$ARCH"
|
||||||
if [[ $OS == "linux" ]]; then
|
if [[ $OS == "linux" || $OS == "windows" ]]; then
|
||||||
tar -czf "release-packages/$release_name.tar.gz" --owner=0 --group=0 --transform "s/^$RELEASE_PATH/$release_name/" "$RELEASE_PATH"
|
tar -czf "release-packages/$release_name.tar.gz" --owner=0 --group=0 --transform "s/^$RELEASE_PATH/$release_name/" "$RELEASE_PATH"
|
||||||
else
|
else
|
||||||
tar -czf "release-packages/$release_name.tar.gz" -s "/^$RELEASE_PATH/$release_name/" "$RELEASE_PATH"
|
tar -czf "release-packages/$release_name.tar.gz" -s "/^$RELEASE_PATH/$release_name/" "$RELEASE_PATH"
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ bundle_vscode() {
|
|||||||
|
|
||||||
# Exclude Node since we want to place it in a directory above.
|
# Exclude Node since we want to place it in a directory above.
|
||||||
rsync_opts+=(--exclude /node)
|
rsync_opts+=(--exclude /node)
|
||||||
|
rsync_opts+=(--exclude /node.exe)
|
||||||
|
|
||||||
# Exclude Node modules. Note that these will already only include production
|
# Exclude Node modules. Note that these will already only include production
|
||||||
# dependencies, so if we do keep them there is no need to do any
|
# dependencies, so if we do keep them there is no need to do any
|
||||||
@@ -128,8 +129,12 @@ bundle_vscode() {
|
|||||||
|
|
||||||
# Copy the Node binary.
|
# Copy the Node binary.
|
||||||
if [[ $KEEP_MODULES = 1 ]]; then
|
if [[ $KEEP_MODULES = 1 ]]; then
|
||||||
|
if [ "$OS" = windows ]; then
|
||||||
|
cp "./lib/vscode-reh-web-$VSCODE_TARGET/node.exe" "$RELEASE_PATH/lib"
|
||||||
|
else
|
||||||
cp "./lib/vscode-reh-web-$VSCODE_TARGET/node" "$RELEASE_PATH/lib"
|
cp "./lib/vscode-reh-web-$VSCODE_TARGET/node" "$RELEASE_PATH/lib"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Merge the package.json for the web/remote server so we can include
|
# Merge the package.json for the web/remote server so we can include
|
||||||
# dependencies, since we want to ship this via NPM.
|
# dependencies, since we want to ship this via NPM.
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ fix-bin-script() {
|
|||||||
# Fix Node path on Windows.
|
# Fix Node path on Windows.
|
||||||
sed -i.bak 's/^set ROOT_DIR=\(.*\)$/set ROOT_DIR=%~dp0..\\..\\..\\..\r\nset VSROOT_DIR=\1/g' "$script"
|
sed -i.bak 's/^set ROOT_DIR=\(.*\)$/set ROOT_DIR=%~dp0..\\..\\..\\..\r\nset VSROOT_DIR=\1/g' "$script"
|
||||||
sed -i.bak 's/%ROOT_DIR%\\out/%VSROOT_DIR%\\out/g' "$script"
|
sed -i.bak 's/%ROOT_DIR%\\out/%VSROOT_DIR%\\out/g' "$script"
|
||||||
|
sed -i.bak 's/%ROOT_DIR%\\node.exe/%ROOT_DIR%\\lib\\node.exe/g' "$script"
|
||||||
|
|
||||||
chmod +x "$script"
|
chmod +x "$script"
|
||||||
rm "$script.bak"
|
rm "$script.bak"
|
||||||
@@ -132,7 +133,7 @@ EOF
|
|||||||
# Set vars and fix paths.
|
# Set vars and fix paths.
|
||||||
case $OS in
|
case $OS in
|
||||||
windows)
|
windows)
|
||||||
fix-bin-script remote-cli/code.cmd
|
fix-bin-script remote-cli/code-server.cmd
|
||||||
fix-bin-script helpers/browser.cmd
|
fix-bin-script helpers/browser.cmd
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
Reference in New Issue
Block a user