Skip to content

Commit 8d616f8

Browse files
authored
fix(release): correct tag for 'gh release create' command (#4886)
* fix(release): correct tag for 'gh release create' command Problem: The tag name passed to this function doesn't match the tag that we created earlier. So, it will attempt to create a new tag. Since Amazon Q is starting at 1.0.0, this will conflict with existing toolkit releases Solution: Add extension to tag, e.g. amazonq/v1.0.0 instead of just v.1.0.0 * comment
1 parent c361461 commit 8d616f8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

buildspec/release/10changeversion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ phases:
3333
git add package-lock.json
3434
git commit -m "Release $VERSION"
3535
echo "tagging commit"
36-
# e.g. amazonq/v1.0.0
36+
# e.g. amazonq/v1.0.0. Ensure this tag is up to date with 50githubrelease.yml
3737
git tag -a "${TARGET_EXTENSION}/v${VERSION}" -m "${TARGET_EXTENSION} version $VERSION $DATE"
3838
# cleanup
3939
git clean -fxd

buildspec/release/50githubrelease.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ phases:
3838
- RELEASE_MESSAGE="${PKG_DISPLAY_NAME} for VS Code $VERSION"
3939
- |
4040
if [ "$STAGE" = "prod" ]; then
41-
gh release create --repo $REPO --title "$PKG_DISPLAY_NAME $VERSION" --notes "$RELEASE_MESSAGE" -- "v$VERSION" "$UPLOAD_TARGET" "$HASH_UPLOAD_TARGET"
41+
# note: the tag arg passed here should match what is in 10changeversion.yml
42+
gh release create --repo $REPO --title "$PKG_DISPLAY_NAME $VERSION" --notes "$RELEASE_MESSAGE" -- "${TARGET_EXTENSION}/v${VERSION}" "$UPLOAD_TARGET" "$HASH_UPLOAD_TARGET"
4243
else
4344
echo "SKIPPED: 'gh release create --repo $REPO'"
4445
fi

0 commit comments

Comments
 (0)