Skip to content

Commit f5b1345

Browse files
committed
Merge branch 'feature/standalone' into feature/cw-proactive-scan
2 parents b563a1c + 7b41c4c commit f5b1345

File tree

351 files changed

+6837
-2489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+6837
-2489
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ src/shared/telemetry/clienttelemetry.d.ts
1111
src/codewhisperer/client/codewhispererclient.d.ts
1212
src/codewhisperer/client/codewhispereruserclient.d.ts
1313
src/amazonqFeatureDev/client/featuredevproxyclient.d.ts
14+
src/auth/sso/oidcclientpkce.d.ts
1415
src/testFixtures/**
1516
packages/core/src/shared/telemetry/clienttelemetry.d.ts
1617
packages/core/src/codewhisperer/client/codewhispererclient.d.ts
1718
packages/core/src/codewhisperer/client/codewhispereruserclient.d.ts
1819
packages/core/src/amazonqFeatureDev/client/featuredevproxyclient.d.ts
20+
packages/core/src/auth/sso/oidcclientpkce.d.ts
1921
packages/core/src/testFixtures/**

.github/workflows/release.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ jobs:
4949
echo "FEAT_NAME=" >> $GITHUB_ENV
5050
echo "TAG_NAME=prerelease" >> $GITHUB_ENV
5151
- run: npm ci
52-
- name: vsix # TODO: For packages/toolkit release only
52+
- name: vsix
5353
run: |
54-
npm run createRelease # Generate CHANGELOG.md
54+
npm run createRelease -w packages/toolkit -w packages/amazonq # Generate CHANGELOG.md
5555
npm run -w packages/toolkit package -- --feature "$FEAT_NAME"
56+
npm run -w packages/amazonq package -- --feature "$FEAT_NAME"
5657
- uses: actions/upload-artifact@v4
5758
with:
5859
name: artifacts
@@ -61,11 +62,18 @@ jobs:
6162
- name: Export outputs
6263
id: build
6364
run: |
65+
write_package_info() {
66+
PKG_NAME=$1
67+
PKG_DISPLAY_NAME=$(grep -m 1 displayName packages/${PKG_NAME}/package.json | grep -o '[a-zA-z][^\"]\+' | tail -n1)
68+
echo "version=$(grep -m 1 version packages/${PKG_NAME}/package.json | grep -o '[0-9][^\"]\+' | sed 's/-SNAPSHOT//')" >> $GITHUB_OUTPUT
69+
echo "${PKG_NAME}_changes<<EOF" >> $GITHUB_OUTPUT
70+
# Add extension display name to the topmost changelog section.
71+
cat packages/${PKG_NAME}/CHANGELOG.md | perl -ne 'BEGIN{$/="\n\n"} print; exit if $. == 2' | sed -e "1 s/## /## ${PKG_DISPLAY_NAME} - /" >> $GITHUB_OUTPUT
72+
}
6473
echo "feature=$FEAT_NAME" >> $GITHUB_OUTPUT
6574
echo "tagname=$TAG_NAME" >> $GITHUB_OUTPUT
66-
echo "version=$(grep -m 1 version packages/toolkit/package.json | grep -o '[0-9][^\"]\+' | sed 's/-SNAPSHOT//')" >> $GITHUB_OUTPUT
67-
echo 'changes<<EOF' >> $GITHUB_OUTPUT
68-
cat CHANGELOG.md | perl -ne 'BEGIN{$/="\n\n"} print; exit if $. == 2' >> $GITHUB_OUTPUT
75+
write_package_info toolkit
76+
write_package_info amazonq
6977
echo 'EOF' >> $GITHUB_OUTPUT
7078
7179
publish:
@@ -82,7 +90,8 @@ jobs:
8290
# Used in release_notes.md
8391
BRANCH: ${{ github.ref_name }}
8492
# Used in release_notes.md
85-
AWS_TOOLKIT_CHANGES: ${{ needs.package.outputs.changes }}
93+
AWS_TOOLKIT_CHANGES: ${{ needs.package.outputs.toolkit_changes }}
94+
AMAZON_Q_CHANGES: ${{ needs.package.outputs.amazonq_changes }}
8695
permissions:
8796
contents: write
8897
steps:

.github/workflows/release_notes.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ _This is an **unsupported preview build** of the `${BRANCH}` branch of AWS Toolk
99

1010
${AWS_TOOLKIT_CHANGES}
1111

12+
${AMAZON_Q_CHANGES}
13+
1214
## Previous changes
1315

14-
- See [CHANGELOG.md](CHANGELOG.md)
16+
- For Toolkit, see [CHANGELOG.md](/packages/toolkit/CHANGELOG.md)
17+
- For Amazon Q, see [CHANGELOG.md](/packages/amazonq/CHANGELOG.md)

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ packages/core/src/testFixtures/**/bin
3838
packages/core/src/testFixtures/**/obj
3939

4040
# Generated by copyFiles.ts
41-
packages/*/CHANGELOG.md
4241
packages/*/LICENSE
4342
packages/*/NOTICE
4443
packages/toolkit/package.nls.json
4544
packages/toolkit/resources
45+
packages/amazonq/package.nls.json
4646
packages/amazonq/resources
4747

4848
# Icons

buildspec/packageTestVsix.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ phases:
2626
commands:
2727
- export HOME=/home/codebuild-user
2828
# Generate CHANGELOG.md
29-
- npm run createRelease
30-
- npm run package
29+
- npm run createRelease -w packages/toolkit -w packages/amazonq
30+
- npm run package -w packages/toolkit -w packages/amazonq
3131

3232
artifacts:
3333
files:
34-
- aws-toolkit-vscode*vsix
35-
discard-paths: true
34+
- '*.vsix'

buildspec/release/00clonerepo.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ phases:
1313
commands:
1414
# Check for implicit env vars passed from the release pipeline.
1515
- test -n "${TOOLKITS_GITHUB_REPO_OWNER}"
16+
- test -n "${TARGET_BRANCH}"
1617

1718
build:
1819
commands:
1920
- git clone https://github.com/${TOOLKITS_GITHUB_REPO_OWNER}/aws-toolkit-vscode.git aws-toolkit-vscode
20-
# checkout master as we want to commit to it later
21-
- cd aws-toolkit-vscode && git checkout master
21+
# checkout the target branch as we want to commit to it later to update versions
22+
- cd aws-toolkit-vscode && git checkout ${TARGET_BRANCH}
2223

2324
artifacts:
2425
base-directory: aws-toolkit-vscode

buildspec/release/10changeversion.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ phases:
88
pre_build:
99
commands:
1010
- aws codeartifact login --tool npm --domain "$TOOLKITS_CODEARTIFACT_DOMAIN" --domain-owner "$TOOLKITS_ACCOUNT_ID" --repository "$TOOLKITS_CODEARTIFACT_REPO"
11+
- test -n "${TARGET_EXTENSION}"
1112

1213
install:
1314
runtime-versions:
@@ -16,18 +17,19 @@ phases:
1617
build:
1718
commands:
1819
- |
20+
echo "TARGET_EXTENSION=${TARGET_EXTENSION}"
1921
echo "Removing SNAPSHOT from version string"
2022
git config --global user.name "aws-toolkit-automation"
2123
git config --global user.email "<>"
22-
VERSION=$(node -e "console.log(require('./packages/toolkit/package.json').version);" | (IFS="-"; read -r version unused && echo "$version"))
24+
VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);" | (IFS="-"; read -r version unused && echo "$version"))
2325
DATE=$(date)
24-
npm version --no-git-tag-version "$VERSION" -w packages/toolkit
26+
npm version --no-git-tag-version "$VERSION" -w packages/${TARGET_EXTENSION}
2527
# Call npm ci because 'createRelease' uses ts-node
2628
npm ci
2729
- |
28-
npm run createRelease
30+
npm run createRelease -w packages/${TARGET_EXTENSION}
2931
- |
30-
git add packages/toolkit/package.json
32+
git add packages/${TARGET_EXTENSION}/package.json
3133
git add package-lock.json
3234
git commit -m "Release $VERSION"
3335
echo "tagging commit"

buildspec/release/20buildrelease.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ phases:
88
pre_build:
99
commands:
1010
- aws codeartifact login --tool npm --domain "$TOOLKITS_CODEARTIFACT_DOMAIN" --domain-owner "$TOOLKITS_ACCOUNT_ID" --repository "$TOOLKITS_CODEARTIFACT_REPO"
11+
- test -n "${TARGET_EXTENSION}"
1112
install:
1213
runtime-versions:
1314
nodejs: 16
@@ -19,12 +20,23 @@ phases:
1920
- apt-get install -y libasound2-plugins
2021
build:
2122
commands:
23+
- echo "TARGET_EXTENSION=${TARGET_EXTENSION}"
2224
# --unsafe-perm is needed because we run as root
2325
- npm ci --unsafe-perm
24-
- npm run package
26+
- |
27+
if [ $TARGET_EXTENSION = "toolkit" ]; then
28+
cp ./README.quickstart.vscode.md ./README.md
29+
fi
30+
- npm run package -w packages/${TARGET_EXTENSION}
31+
- cp packages/${TARGET_EXTENSION}/package.json ./package.json
32+
- NUM_VSIX=$(ls -1q *.vsix | wc -l)
33+
- |
34+
if [ "$NUM_VSIX" != "1" ]; then
35+
echo "Number of .vsix to release is not exactly 1, it is: ${NUM_VSIX}"
36+
exit 1
37+
fi
2538
2639
artifacts:
2740
files:
28-
- aws-toolkit-vscode*
29-
- packages/toolkit/package.json
30-
discard-paths: true
41+
- '*.vsix'
42+
- package.json

buildspec/release/40pushtogithub.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,24 @@ phases:
1414
# Check for implicit env vars passed from the release pipeline.
1515
- test -n "${TOOLKITS_GITHUB_REPO_OWNER}"
1616
- test -n "${GITHUB_TOKEN}"
17+
- test -n "${TARGET_EXTENSION}"
18+
- test -n "${TARGET_BRANCH}"
1719
- REPO_URL="https://[email protected]/${TOOLKITS_GITHUB_REPO_OWNER}/aws-toolkit-vscode.git"
1820

1921
build:
2022
commands:
2123
- |
24+
echo "TARGET_EXTENSION=${TARGET_EXTENSION}"
2225
git config --global user.name "aws-toolkit-automation"
2326
git config --global user.email "<>"
2427
git remote add originWithCreds "$REPO_URL"
2528
echo "Adding SNAPSHOT to next version string"
2629
# Increase minor version
27-
npm version --no-git-tag-version minor -w packages/toolkit
28-
VERSION=$(node -e "console.log(require('./packages/toolkit/package.json').version);")
30+
npm version --no-git-tag-version minor -w packages/${TARGET_EXTENSION}
31+
VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
2932
# Append -SNAPSHOT
30-
npm version --no-git-tag-version "${VERSION}-SNAPSHOT" -w packages/toolkit
31-
git add packages/toolkit/package.json
33+
npm version --no-git-tag-version "${VERSION}-SNAPSHOT" -w packages/${TARGET_EXTENSION}
34+
git add packages/${TARGET_EXTENSION}/package.json
3235
git add package-lock.json
3336
git commit -m "Update version to snapshot version: ${VERSION}-SNAPSHOT"
3437
- |
@@ -38,4 +41,4 @@ phases:
3841
fi
3942
echo "pushing to github"
4043
git push originWithCreds --tags
41-
git push originWithCreds master
44+
git push originWithCreds ${TARGET_BRANCH}

buildspec/release/50githubrelease.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,24 @@ phases:
1919
commands:
2020
# Check for implicit env vars passed from the release pipeline.
2121
- test -n "${TOOLKITS_GITHUB_REPO_OWNER}"
22+
- test -n "${TARGET_EXTENSION}"
2223
- REPO="${TOOLKITS_GITHUB_REPO_OWNER}/aws-toolkit-vscode"
2324

2425
build:
2526
commands:
27+
- echo "TARGET_EXTENSION=${TARGET_EXTENSION}"
2628
# pull in the build artifacts
2729
- cp -r ${CODEBUILD_SRC_DIR_buildPipeline}/* .
28-
- VERSION=$(node -e "console.log(require('./packages/toolkit/package.json').version);")
29-
- UPLOAD_TARGET=$(ls aws-toolkit-vscode*.vsix)
30+
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
31+
- UPLOAD_TARGET=$(ls *.vsix)
3032
- HASH_UPLOAD_TARGET=${UPLOAD_TARGET}.sha384
3133
- 'HASH=$(sha384sum -b $UPLOAD_TARGET | cut -d" " -f1)'
3234
- echo "Writing hash to $HASH_UPLOAD_TARGET"
3335
- echo $HASH > $HASH_UPLOAD_TARGET
3436
- echo "posting $VERSION with sha384 hash $HASH to GitHub"
3537
- RELEASE_MESSAGE="AWS Toolkit for VS Code $VERSION"
3638
- |
37-
if [ $STAGE = "prod" ]; then
39+
if [ "$STAGE" = "prod" ] && [ "$TARGET_EXTENSION" = "toolkit" ]; then
3840
gh release create --repo $REPO --title "$VERSION" --notes "$RELEASE_MESSAGE" -- "v$VERSION" "$UPLOAD_TARGET" "$HASH_UPLOAD_TARGET"
3941
else
4042
echo "SKIPPED: 'gh release create --repo $REPO'"

0 commit comments

Comments
 (0)