Skip to content

Commit

Permalink
test-launcher: rebuild the .vsix on the fly if it's outdated
Browse files Browse the repository at this point in the history
Rebuild the vsix before installing it if:
- there is no .vsix
- the sources are newer that the .vsix file
  • Loading branch information
goneri committed Nov 14, 2024
1 parent 8fa0084 commit c7039a4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tools/test-launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c7039a4

Please sign in to comment.