From 3f46b015b1e465dff45d848774a5c2a29868ab1c Mon Sep 17 00:00:00 2001 From: Enguerrand de Ribaucourt Date: Tue, 28 May 2024 15:34:47 +0200 Subject: [PATCH] CI: Automate updating the VSCode version in the integration tests --- integration-tests/src/runTest.ts | 3 ++- scripts/update-ref.sh | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/integration-tests/src/runTest.ts b/integration-tests/src/runTest.ts index 42603ce7..848c34b3 100644 --- a/integration-tests/src/runTest.ts +++ b/integration-tests/src/runTest.ts @@ -14,7 +14,8 @@ import { pythonVersion, bashVersion } from './utils/version' async function main (): Promise { try { - const vscodeExecutablePath = await downloadAndUnzipVSCode('1.89.1') + const vscodeVersion = '1.89.1' + const vscodeExecutablePath = await downloadAndUnzipVSCode(vscodeVersion) const [cliPath, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath) cp.spawnSync( diff --git a/scripts/update-ref.sh b/scripts/update-ref.sh index c0bfd165..26081c2c 100644 --- a/scripts/update-ref.sh +++ b/scripts/update-ref.sh @@ -77,5 +77,13 @@ echo "" >> ../$FILE cd .. rm -rf yocto-docs +git clone --depth 1 --filter=blob:none --sparse https://github.com/microsoft/vscode.git +cd vscode +git fetch --tags +TMP_TAG=$(git tag --sort=-v:refname | grep -E '^[0-9.]+$' | head -n 1) +sed -e "s/vscodeVersion = '.*'/vscodeVersion = '$TMP_TAG'/" -i ../integration-tests/src/runTest.ts +cd .. +rm -rf vscode + cat $TMP_FILE >> $FILE -rm $TMP_FILE \ No newline at end of file +rm $TMP_FILE