Skip to content

Commit 91bb9d7

Browse files
committed
fix(cli): use explicit urls (#2319)
1 parent 3b764c3 commit 91bb9d7

File tree

5 files changed

+30
-12
lines changed

5 files changed

+30
-12
lines changed

.github/workflows/insider-linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ jobs:
217217
run: ./check_tags.sh
218218
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
219219

220-
- name: Install libkrb5-dev
221-
run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev
220+
- name: Install dependencies
221+
run: ./build/linux/deps.sh
222222
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
223223

224224
- uses: actions-rust-lang/setup-rust-toolchain@v1

.github/workflows/stable-linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ jobs:
218218
run: ./check_tags.sh
219219
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
220220

221-
- name: Install libkrb5-dev
222-
run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev
221+
- name: Install dependencies
222+
run: ./build/linux/deps.sh
223223
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
224224

225225
- uses: actions-rust-lang/setup-rust-toolchain@v1

build/linux/deps.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
sudo apt-get update -y
6+
7+
sudo apt-get install -y libkrb5-dev
8+
9+
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
10+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu crossbuild-essential-arm64
11+
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
12+
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf crossbuild-essential-armhf
13+
fi

build_cli.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ cd cli
77
export CARGO_NET_GIT_FETCH_WITH_CLI="true"
88
export VSCODE_CLI_APP_NAME="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )"
99
export VSCODE_CLI_BINARY_NAME="$( node -p "require(\"../product.json\").serverApplicationName" )"
10+
export VSCODE_CLI_UPDATE_ENDPOINT="https://raw.githubusercontent.com/VSCodium/versions/refs/heads/master"
11+
12+
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
13+
export VSCODE_CLI_DOWNLOAD_ENDPOINT="https://github.com/VSCodium/vscodium-insiders/releases"
14+
else
15+
export VSCODE_CLI_DOWNLOAD_ENDPOINT="https://github.com/VSCodium/vscodium/releases"
16+
fi
1017

1118
TUNNEL_APPLICATION_NAME="$( node -p "require(\"../product.json\").tunnelApplicationName" )"
1219
NAME_SHORT="$( node -p "require(\"../product.json\").nameShort" )"
@@ -58,8 +65,6 @@ else
5865
export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
5966
export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
6067
export PKG_CONFIG_ALLOW_CROSS=1
61-
62-
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu crossbuild-essential-arm64
6368
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
6469
VSCODE_CLI_TARGET="armv7-unknown-linux-gnueabihf"
6570

@@ -69,8 +74,6 @@ else
6974
export CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc
7075
export CXX_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++
7176
export PKG_CONFIG_ALLOW_CROSS=1
72-
73-
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf crossbuild-essential-armhf
7477
elif [[ "${VSCODE_ARCH}" == "x64" ]]; then
7578
VSCODE_CLI_TARGET="x86_64-unknown-linux-gnu"
7679
fi

patches/cli.patch

+6-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ index 2ddefe1..ab9c658 100644
1313
+ .join(args.release.quality.server_entrypoint().unwrap());
1414

1515
diff --git a/cli/src/constants.rs b/cli/src/constants.rs
16-
index 1e277a8..353aee7 100644
16+
index 1e277a8..97f17d3 100644
1717
--- a/cli/src/constants.rs
1818
+++ b/cli/src/constants.rs
19-
@@ -36,2 +36,5 @@ pub const VSCODE_CLI_COMMIT: Option<&'static str> = option_env!("VSCODE_CLI_COMM
20-
pub const VSCODE_CLI_UPDATE_ENDPOINT: Option<&'static str> = option_env!("VSCODE_CLI_UPDATE_URL");
21-
+pub const VSCODE_CLI_DOWNLOAD_ENDPOINT: Option<&'static str> = option_env!("VSCODE_CLI_DOWNLOAD_URL");
19+
@@ -35,3 +35,6 @@ pub const DOCUMENTATION_URL: Option<&'static str> = option_env!("VSCODE_CLI_DOCU
20+
pub const VSCODE_CLI_COMMIT: Option<&'static str> = option_env!("VSCODE_CLI_COMMIT");
21+
-pub const VSCODE_CLI_UPDATE_ENDPOINT: Option<&'static str> = option_env!("VSCODE_CLI_UPDATE_URL");
22+
+pub const VSCODE_CLI_UPDATE_ENDPOINT: Option<&'static str> = option_env!("VSCODE_CLI_UPDATE_ENDPOINT");
23+
+pub const VSCODE_CLI_DOWNLOAD_ENDPOINT: Option<&'static str> = option_env!("VSCODE_CLI_DOWNLOAD_ENDPOINT");
2224
+pub const VSCODE_CLI_APP_NAME: Option<&'static str> = option_env!("VSCODE_CLI_APP_NAME");
2325
+pub const VSCODE_CLI_BINARY_NAME: Option<&'static str> = option_env!("VSCODE_CLI_BINARY_NAME");
2426

0 commit comments

Comments
 (0)