-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: new private 'cdk-release' tool for performing releases #15331
Conversation
8e1e551
to
040fc48
Compare
040fc48
to
1b71bbe
Compare
@rix0rrr incorporated your comments, would appreciate another review! |
1b71bbe
to
1f8aaea
Compare
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
) Introduce a new repo-private tool called `cdk-release` that replaces `standard-version` in our 'bump' process. It's responsible for updating the version file with the new version, generating the Changelog based on on the commit history, and performing the commit that includes the two above files. It allows us to correctly handle edge cases that we had to work around previously with `standard-version`: * For patch releases, `standard-version` always generated the main header as H3, while we want H2. We always had to correct that manually, and we sometimes forgot. This tool does the correct thing for patch releases too. * We had to hack around when we wanted to change the heading 'BREAKING CHANGES' to 'BREAKING CHANGES TO EXPERIMENTAL FEATURES'. This tool now does it natively, no hacks needed. * In V2, `standard-version` couldn't figure out the tag to compare to, because we have tags for 2 major versions present in the repo. This tool handles this without the hacks of locally removing and then re-fetching the tags. * Also in V2, we want to strip the changes to experimental packages (as those are not included in `aws-cdk-lib`). With `standard-version`, we had to grep in the resulting Changelog, which was very fragile (for example, in `2.0.0-rc.7`, our Changelog includes breaking changes to `appmesh`, which is an experimental module). This tool handles this case natively, by filtering out commits, without the need for fragile Changelog grepping. To make sure we don't break our release process, allow passing the environment variable `LEGACY_BUMP` as truthy to fall back on `standard-version`. Once we make at least one successful release, in both major versions, using this new tool, I'll remove the old `standard-version` based code in a separate PR. In a subsequent PR, the tool will be enhanced with the capability to generate separate version bumps and Changelogs for experimental packages in V2. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
) Introduce a new repo-private tool called `cdk-release` that replaces `standard-version` in our 'bump' process. It's responsible for updating the version file with the new version, generating the Changelog based on on the commit history, and performing the commit that includes the two above files. It allows us to correctly handle edge cases that we had to work around previously with `standard-version`: * For patch releases, `standard-version` always generated the main header as H3, while we want H2. We always had to correct that manually, and we sometimes forgot. This tool does the correct thing for patch releases too. * We had to hack around when we wanted to change the heading 'BREAKING CHANGES' to 'BREAKING CHANGES TO EXPERIMENTAL FEATURES'. This tool now does it natively, no hacks needed. * In V2, `standard-version` couldn't figure out the tag to compare to, because we have tags for 2 major versions present in the repo. This tool handles this without the hacks of locally removing and then re-fetching the tags. * Also in V2, we want to strip the changes to experimental packages (as those are not included in `aws-cdk-lib`). With `standard-version`, we had to grep in the resulting Changelog, which was very fragile (for example, in `2.0.0-rc.7`, our Changelog includes breaking changes to `appmesh`, which is an experimental module). This tool handles this case natively, by filtering out commits, without the need for fragile Changelog grepping. To make sure we don't break our release process, allow passing the environment variable `LEGACY_BUMP` as truthy to fall back on `standard-version`. Once we make at least one successful release, in both major versions, using this new tool, I'll remove the old `standard-version` based code in a separate PR. In a subsequent PR, the tool will be enhanced with the capability to generate separate version bumps and Changelogs for experimental packages in V2. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Introduce a new repo-private tool called
cdk-release
that replacesstandard-version
in our 'bump' process.It's responsible for updating the version file with the new version, generating the Changelog based on on the commit history,
and performing the commit that includes the two above files.
It allows us to correctly handle edge cases that we had to work around previously with
standard-version
:standard-version
always generated the main header as H3, while we want H2.We always had to correct that manually, and we sometimes forgot.
This tool does the correct thing for patch releases too.
This tool now does it natively, no hacks needed.
standard-version
couldn't figure out the tag to compare to, because we have tags for 2 major versions present in the repo.This tool handles this without the hacks of locally removing and then re-fetching the tags.
aws-cdk-lib
).With
standard-version
, we had to grep in the resulting Changelog, which was very fragile(for example, in
2.0.0-rc.7
, our Changelog includes breaking changes toappmesh
, which is an experimental module).This tool handles this case natively, by filtering out commits, without the need for fragile Changelog grepping.
To make sure we don't break our release process, allow passing the environment variable
LEGACY_BUMP
as truthy to fall back onstandard-version
.Once we make at least one successful release,
in both major versions, using this new tool,
I'll remove the old
standard-version
based code in a separate PR.In a subsequent PR, the tool will be enhanced with the capability to generate separate version bumps and Changelogs for experimental packages in V2.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license