From c3a709e0410db517c0906f80c5006fbcb7d777a5 Mon Sep 17 00:00:00 2001 From: kxxt Date: Sun, 21 Jul 2024 10:01:39 +0800 Subject: [PATCH] build(riscv): catch electron version mismatch --- package_linux_bin.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/package_linux_bin.sh b/package_linux_bin.sh index e5eeb326662..e896fcd94f1 100755 --- a/package_linux_bin.sh +++ b/package_linux_bin.sh @@ -26,10 +26,15 @@ if [[ "${VSCODE_ARCH}" == "riscv64" ]]; then export VSCODE_ELECTRON_REPO='riscv-forks/electron-riscv-releases' export ELECTRON_SKIP_BINARY_DOWNLOAD=1 export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 - ELECTRON_VERSION="v29.4.0" - # Look for releases here if electron version used by vscode changed - # https://github.com/riscv-forks/electron-riscv-releases/releases - export VSCODE_ELECTRON_TAG="${ELECTRON_VERSION}.riscv2" + ELECTRON_VERSION="29.4.0" + if [[ "${ELECTRON_VERSION}" != "$(yarn config get target)" ]]; then + # Fail the pipeline if electron target doesn't match what is used. + # Look for releases here if electron version used by vscode changed: + # https://github.com/riscv-forks/electron-riscv-releases/releases + echo "Electron RISC-V binary version doesn't match target electron version!" + exit 1 + fi + export VSCODE_ELECTRON_TAG="v${ELECTRON_VERSION}.riscv2" echo "7244465fe0c1a6ac6e34fe765a9d90fe0017b1a6d3406fd6b8dd9f5d2c8c9df5 *electron-v29.4.0-linux-riscv64.zip" >> build/checksums/electron.txt fi