Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 5 additions & 3 deletions buildspec/release/80notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ phases:
- 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)
- MESSAGE=$(envsubst < ./buildspec/release/notify.txt | jq -R -s '.')
- echo "Will post message - \n\n${MESSAGE}\n"
- echo "Full command - 'curl -v POST \"[NOTIFY_URL]\" -H \"Content-Type:application/json\" --data \"{\"Content\":${MESSAGE}}\"'"
- |
if [ "$STAGE" != "prod" ]; then
echo "SKIPPED (stage=${STAGE}): 'curl -v POST \"[NOTIFY_URL]\" -H \"Content-Type:application/json\" --data \"{\"Content\":\"${MESSAGE}\"}\"'"
echo "SKIPPED (stage=${STAGE}): curl -v POST ..."
exit 0
fi
curl -v POST "${NOTIFY_URL}" -H "Content-Type:application/json" --data "{\"Content\":\"${MESSAGE}\"}"
curl -v POST "${NOTIFY_URL}" -H "Content-Type:application/json" --data "{\"Content\":${MESSAGE}}"
4 changes: 4 additions & 0 deletions packages/toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.50.0 2025-03-13

- Miscellaneous non-user-facing changes

## 3.49.0 2025-03-06

- **Feature** Step Functions: Updated previewStateMachine command to open with Workflow Studio instead
Expand Down
18 changes: 9 additions & 9 deletions scripts/createRelease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ const changesFile = path.join(changesDirectory, `${packageJson.version}.json`)
nodefs.mkdirSync(nextReleaseDirectory, { recursive: true })

const changeFiles = nodefs.readdirSync(nextReleaseDirectory)
if (changeFiles.length === 0) {
console.warn('no changes to release (missing .changes/ directory)')
process.exit()
}
try {
nodefs.accessSync(changesFile)
console.log(`error: changelog data file already exists: ${changesFile}`)
Expand All @@ -45,21 +41,25 @@ for (const changeFile of changeFiles) {
changelog.entries.push(file)
}

changelog.entries.sort((x: { type: string }, y: { type: string }) => x.type.localeCompare(y.type))

// Write changelog file
nodefs.writeFileSync(changesFile, JSON.stringify(changelog, undefined, '\t'))
const fileData = nodefs.readFileSync(path.join(cwd, 'CHANGELOG.md'))
let append = `## ${packageJson.version} ${timestamp}\n\n`
for (const file of changelog.entries) {
append += `- **${file.type}** ${file.description}\n`
if (changelog.entries.length === 0) {
console.warn('no changes to release (missing .changes/ directory)')
append += '- Miscellaneous non-user-facing changes\n'
} else {
changelog.entries.sort((x: { type: string }, y: { type: string }) => x.type.localeCompare(y.type))
for (const file of changelog.entries) {
append += `- **${file.type}** ${file.description}\n`
}
}

append += '\n' + fileData.toString()
nodefs.writeFileSync('CHANGELOG.md', append)

child_process.execSync(`git add ${changesDirectory}`)
child_process.execSync(`git rm -rf ${nextReleaseDirectory}`)
child_process.execSync(`git rm -rf --ignore-unmatch ${nextReleaseDirectory}`)
child_process.execSync('git add CHANGELOG.md')

console.log(changesFile)
Loading