Skip to content

Commit

Permalink
extension's vscode engine version * should be compatible with all VS …
Browse files Browse the repository at this point in the history
…Code editors (#1087)

Signed-off-by: Valeriy Svydenko <[email protected]>
  • Loading branch information
svor authored Jul 26, 2024
1 parent c3b8d28 commit 99cccaf
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ for i in $(seq 0 "$((numberOfExtensions - 1))"); do
vscodeEngineVersion="${vscodeEngineVersion//x/0}"
# check if the extension's engine version is compatible with the code version
# if the extension's engine version is ahead of the code version, print an error
if [[ "$vscodeEngineVersion" != "$(echo -e "$vscodeEngineVersion\n$codeVersion" | sort -V | head -n1)" ]]; then
if [[ "$vscodeEngineVersion" != "*" && "$vscodeEngineVersion" != "$(echo -e "$vscodeEngineVersion\n$codeVersion" | sort -V | head -n1)" ]]; then
echo "Version ${vsixVersion} of ${vsixName} is not compatible with VS Code editor $codeVersion"
exit 1
fi
Expand Down Expand Up @@ -185,8 +185,11 @@ for i in $(seq 0 "$((numberOfExtensions - 1))"); do
# replace x by 0 in the engine version
vscodeEngineVersion="${vscodeEngineVersion//x/0}"
# check if the extension's engine version is compatible with the code version
# if the extension's engine version is '*', it means the extension is compatible with any VS Code version
if [[ "$vscodeEngineVersion" == "*" ]]; then
echo -e "${GREEN}${EMOJI_PASS}${RESETSTYLE} compatible."
# if the extension's engine version is ahead of the code version, check a next version of the extension
if [[ "$vscodeEngineVersion" = "$(echo -e "$vscodeEngineVersion\n$codeVersion" | sort -V | head -n1)" ]]; then
elif [[ "$vscodeEngineVersion" = "$(echo -e "$vscodeEngineVersion\n$codeVersion" | sort -V | head -n1)" ]]; then
#VS Code version >= Engine version, can proceed."
echo -e "${GREEN}${EMOJI_PASS}${RESETSTYLE} compatible."
else
Expand Down

0 comments on commit 99cccaf

Please sign in to comment.