-
-
Notifications
You must be signed in to change notification settings - Fork 22
When a new release is made, bump the CHANGELOG
version in the next release branch and the originating release branch
#40
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
Merged
Ocramius
merged 9 commits into
laminas:1.2.x
from
weierophinney:feature/33-bump-changelog
Aug 12, 2020
Merged
When a new release is made, bump the CHANGELOG
version in the next release branch and the originating release branch
#40
Ocramius
merged 9 commits into
laminas:1.2.x
from
weierophinney:feature/33-bump-changelog
Aug 12, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… version entries This patch introduces the interface `BumpAndCommitChangelogVersion`, describing an operation where a new changelog entry is injected into the changelog file, if it exists; the new version is determined by the first argument passed, which must be one of a set of known constant values describing patch and minor release bumps. This patch also introduces the `CheckoutBranch` interface, describing how to checkout a specific branch of a repository. It has one implementation, `CheckoutBranchViaConsole`. The new class `BumpAndCommitChangelogVersionViaKeepAChangelog` composes a `CheckoutBranch` instance, as well as `CommitFile`, `Push`, and `LoggerInterface` instances, to assist in the work of updating the changelog. If no changelog is detected in the branch, no work is done. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
…ts, bump the changelog file to the next minor release, commit, and push. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
Command determines the name of the release from the closed milestone, and uses it to bump the changelog version, commit, and push back to the associated release branch. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
…ion of other actions By doing this as a separate command, we can delay adding the patch-level changelog stub to the originating release branch until **after** we have created the next release branch. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
Ocramius
requested changes
Aug 11, 2020
Signed-off-by: Matthew Weier O'Phinney <[email protected]>
…Type` argument Can use `{class}::TYPE_*` annotations instead of declaring an additional constant. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
Signed-off-by: Matthew Weier O'Phinney <[email protected]>
Signed-off-by: Matthew Weier O'Phinney <[email protected]>
- Details new laminas:automatic-releases:bump-changelog command - Details changes to "switch default branch to next minor" command Signed-off-by: Matthew Weier O'Phinney <[email protected]>
@Ocramius I've pushed changes addressing the feedback! |
Ocramius
approved these changes
Aug 12, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks @weierophinney!
CHANGELOG
version in the next release branch and the originating release branch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch adds a new interface,
BumpAndCommitChangelogVersion
, which describes classes that can update a changelog file to add a new version, and then commit and push the changes. I have included one implementation,BumpAndCommitChangelogVersionViaKeepAChangelog
which uses utilities from phly/keep-a-changelog, as well as internal utilities, to do this.I have added
BumpAndCommitChangelogVersion
as a dependency onSwitchDefaultBranchToNextMinor
. The functionality is invoked only if a new release branch is made, and then immediately following that operation. At that time, the changelog is updated with a stub for the next minor version.I have created a new command,
laminas:releases:bump-changelog
, implemented byBumpChangelogForReleaseBranch
, which determines the release version and release branch, and uses those to call the composedBumpAndCommitChangelogVersion
, this time bumping the changelog to the next patch version on the originating release branch.Finally, I updated the sample workflow to call
laminas:releases:bump-changelog
as the final action in the workflow. This approach guarantees that the newly-createdvNEXT
release branch does NOT contain a stub for the next patch release; only the originating branch will.Fixes #33