From c7039a4d876a576fab9f7c873014a9ddeb03679f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Wed, 13 Nov 2024 17:05:41 -0500 Subject: [PATCH] test-launcher: rebuild the .vsix on the fly if it's outdated Rebuild the vsix before installing it if: - there is no .vsix - the sources are newer that the .vsix file --- tools/test-launcher.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/test-launcher.sh b/tools/test-launcher.sh index 561d63155..c5cc9876e 100755 --- a/tools/test-launcher.sh +++ b/tools/test-launcher.sh @@ -59,7 +59,20 @@ fi ${EXTEST} get-vscode -c "${CODE_VERSION}" -s out/test-resources ${EXTEST} get-chromedriver -c "${CODE_VERSION}" -s out/test-resources if [[ "$COVERAGE" == "" ]]; then - ${EXTEST} install-vsix -f ansible-*.vsix -e out/ext -s out/test-resources + vsix=$(find . -maxdepth 1 -name '*.vsix') + if [ -z "${vsix}" ]; then + echo "Building the vsix package" + yarn package + vsix=$(find . -maxdepth 1 -name '*.vsix') + fi + # shellcheck disable=SC2086 + if [ "$(find src test -newer ${vsix})" != "" ]; then + echo "Rebuilding the vsix package (it was outdated)" + yarn package + vsix=$(find . -maxdepth 1 -name '*.vsix') + fi + + ${EXTEST} install-vsix -f "${vsix}" -e out/ext -s out/test-resources fi ${EXTEST} install-from-marketplace redhat.vscode-yaml ms-python.python -e out/ext -s out/test-resources