Skip to content

Commit

Permalink
Merge master into feature/sdkv3
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-toolkit-automation authored Feb 18, 2025
2 parents db5d336 + f847d28 commit 3ffc8fe
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions buildspec/release/80notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ phases:
build:
commands:
- echo "TARGET_EXTENSION=${TARGET_EXTENSION}"
- EXTENSION_NAME=$([ "$TARGET_EXTENSION" = "amazonq" ] && echo "Amazon Q" || echo "AWS Toolkit")
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
- CHANGELOG=$(cat packages/${TARGET_EXTENSION}/CHANGELOG.md | perl -ne 'BEGIN{$/="\n\n"} print if $. == 2')
- MESSAGE=$(envsubst < "$GITHUB_WORKSPACE/buildspec/release/notify.txt")
- DATA="{'Content':'${MESSAGE}'}"
- export EXTENSION_NAME=$([ "$TARGET_EXTENSION" = "amazonq" ] && echo "Amazon Q" || echo "AWS Toolkit")
- export VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
- export CHANGELOG=$(cat packages/${TARGET_EXTENSION}/CHANGELOG.md | perl -ne 'BEGIN{$/="\n\n"} print if $. == 2')
- MESSAGE=$(envsubst < ./buildspec/release/notify.txt)
- |
# TODO: Enable for prod only after testing
if [ "$STAGE" = "prod" ]; then
echo "SKIPPED (stage=${STAGE}): 'curl -v POST \"[SLACK_URL]\" -H \"Content-Type:application/json\" --data $DATA'"
if [ "$STAGE" != "prod" ]; then
echo "SKIPPED (stage=${STAGE}): 'curl -v POST \"[NOTIFY_URL]\" -H \"Content-Type:application/json\" --data \"{\"Content\":\"${MESSAGE}\"}\"'"
exit 0
fi
curl -v POST "${NOTIFY_URL}" -H "Content-Type:application/json" --data $DATA
curl -v POST "${NOTIFY_URL}" -H "Content-Type:application/json" --data "{\"Content\":\"${MESSAGE}\"}"

0 comments on commit 3ffc8fe

Please sign in to comment.