Skip to content

Commit 590a083

Browse files
Merge master into feature/amazonqLSP
2 parents 20ce311 + aa0e949 commit 590a083

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

buildspec/release/80notify.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 0.2
2+
3+
phases:
4+
install:
5+
runtime-versions:
6+
nodejs: 20
7+
8+
pre_build:
9+
commands:
10+
# Check for implicit env vars passed from the release pipeline.
11+
- test -n "${NOTIFY_URL}"
12+
- test -n "${TARGET_EXTENSION}"
13+
14+
build:
15+
commands:
16+
- echo "TARGET_EXTENSION=${TARGET_EXTENSION}"
17+
- EXTENSION_NAME=$([ "$TARGET_EXTENSION" = "amazonq" ] && echo "Amazon Q" || echo "AWS Toolkit")
18+
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
19+
- CHANGELOG=$(cat packages/${TARGET_EXTENSION}/CHANGELOG.md | perl -ne 'BEGIN{$/="\n\n"} print if $. == 2')
20+
- MESSAGE=$(envsubst < "$GITHUB_WORKSPACE/buildspec/release/notify.txt")
21+
- DATA="{'Content':'${MESSAGE}'}"
22+
- |
23+
# TODO: Enable for prod only after testing
24+
if [ "$STAGE" = "prod" ]; then
25+
echo "SKIPPED (stage=${STAGE}): 'curl -v POST \"[SLACK_URL]\" -H \"Content-Type:application/json\" --data $DATA'"
26+
exit 0
27+
fi
28+
curl -v POST "${NOTIFY_URL}" -H "Content-Type:application/json" --data $DATA

buildspec/release/notify.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Released ${EXTENSION_NAME} v${VERSION} for VSCode
2+
3+
${CHANGELOG}
4+
5+
Changelog: https://github.com/aws/aws-toolkit-vscode/blob/master/packages/${TARGET_EXTENSION}/CHANGELOG.md
6+
Release Arifact: https://github.com/aws/aws-toolkit-vscode/releases/tag/${TARGET_EXTENSION}/v${VERSION}

0 commit comments

Comments
 (0)