Skip to content

Commit c45ead0

Browse files
author
tomzu
committed
delete beta_version variable
1 parent 9513b1d commit c45ead0

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

buildspec/release/70checkmarketplace.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,33 @@ phases:
2222
build:
2323
commands:
2424
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
25-
# get extension name, also an old version for beta testing
25+
# get extension name, if in beta, use some hard-coded recent version
2626
- |
2727
if [ "${TARGET_EXTENSION}" = "amazonq" ]; then
2828
extension_name="amazonwebservices.amazon-q-vscode"
29-
beta_version="@1.43.0"
29+
[ "$STAGE" != "prod" ] && VERSION="1.43.0" || true
3030
elif [ "${TARGET_EXTENSION}" = "toolkit" ]; then
3131
extension_name="amazonwebservices.aws-toolkit-vscode"
32-
beta_version="@3.42.0"
32+
[ "$STAGE" != "prod" ] && VERSION="3.42.0" || true
3333
else
3434
echo checkmarketplace: "Unknown TARGET_EXTENSION: ${TARGET_EXTENSION}"
3535
exit 1
3636
fi
37-
# If in beta, install specific extension versions
3837
- |
3938
if [ "$STAGE" != "prod" ]; then
40-
VERSION=${beta_version#@}
41-
echo "checkmarketplace: Non-production stage detected. Installing beta version '${VERSION}'."
42-
else
43-
beta_version=""
39+
echo "checkmarketplace: Non-production stage detected. Installing hardcoded version '${VERSION}'."
4440
fi
45-
# keep reinstalling the extension until the desired version is updated. Otherwise fail on codebuild timeout (1 hour).
41+
# keep installing the desired extension version until successful. Otherwise fail on codebuild timeout (1 hour).
4642
- |
4743
while true; do
4844
code --uninstall-extension "${extension_name}" --no-sandbox --user-data-dir /tmp/vscode
49-
code --install-extension "${extension_name}${beta_version}" --no-sandbox --user-data-dir /tmp/vscode
45+
code --install-extension "${extension_name}@${VERSION}" --no-sandbox --user-data-dir /tmp/vscode
5046
cur_version=$(code --list-extensions --show-versions --no-sandbox --user-data-dir /tmp/vscode | grep ${extension_name} | cut -d'@' -f2)
5147
if [ "${cur_version}" = "${VERSION}" ]; then
5248
echo "checkmarketplace: Extension ${extension_name} is updated to version '${cur_version}.'"
5349
break
5450
else
55-
echo "checkmarketplace: Current version '${cur_version}' does not match expected version '${VERSION}'. Retrying..."
51+
echo "checkmarketplace: Expected extension version '${VERSION}' has not been successfully installed. Retrying..."
5652
fi
5753
sleep 120 # Wait for 2 minutes before retrying
5854
done

0 commit comments

Comments
 (0)