Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions buildspec/release/70checkmarketplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,31 @@ phases:
build:
commands:
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
# get extension name
# get extension name, also an old version for beta testing
- |
if [ "${TARGET_EXTENSION}" = "amazonq" ]; then
extension_name="amazonwebservices.amazon-q-vscode"
beta_version="@1.43.0"
elif [ "${TARGET_EXTENSION}" = "toolkit" ]; then
extension_name="amazonwebservices.aws-toolkit-vscode"
beta_version="@3.42.0"
else
echo checkmarketplace: "Unknown TARGET_EXTENSION: ${TARGET_EXTENSION}"
exit 1
fi
# If in beta, install specific extension versions
- |
if [ "$STAGE" != "prod" ]; then
VERSION=${beta_version#@}
echo "checkmarketplace: Non-production stage detected. Installing beta version '${VERSION}'."
else
beta_version=""
fi
# keep reinstalling the extension until the desired version is updated. Otherwise fail on codebuild timeout (1 hour).
- |
while true; do
code --uninstall-extension "${extension_name}" --no-sandbox --user-data-dir /tmp/vscode
code --install-extension ${extension_name} --no-sandbox --user-data-dir /tmp/vscode
code --install-extension "${extension_name}${beta_version}" --no-sandbox --user-data-dir /tmp/vscode
cur_version=$(code --list-extensions --show-versions --no-sandbox --user-data-dir /tmp/vscode | grep ${extension_name} | cut -d'@' -f2)
if [ "${cur_version}" = "${VERSION}" ]; then
echo "checkmarketplace: Extension ${extension_name} is updated to version '${cur_version}.'"
Expand Down
Loading