-
Notifications
You must be signed in to change notification settings - Fork 523
Add first part of changelog command implementation #991
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
Conversation
We're now able to generate changelogs for the two needed use cases: A patch release: ``` > go run cmd/krel/main.go changelog -t $TOKEN --tars $HOME/tars --branch release-1.16 INFO Using branch "release-1.16" INFO Using discovery mode "patch-to-patch" ... INFO Parsing latest tag v1.16.4 INFO Parsing previous tag v1.16.3 INFO discovered start SHA b3cbbae08ec52a7fc73d334838e18d17e8512749 INFO discovered end SHA 224be7bdce5a9dd0c2fd0d46b83865648e2fe0ba INFO fetching all commits. This might take a while... INFO starting to process commit 1 of 56 (1.79%): 224be7bdce5a9dd0c2fd0d46b83865648e2fe0ba ... ``` A minor release (no branch needed because the defalut is the `master` branch): ``` > go run cmd/krel/main.go changelog -t $TOKEN --tars $HOME/tars INFO Using branch "master" INFO Using discovery mode "minor-to-minor" ... INFO latest non patch version v1.17.0 INFO previous non patch version v1.16.0 INFO discovered start SHA 2bd9643cee5b3b3a5ecbd3af49d09018f0773c77 INFO discovered end SHA 70132b0f130acc0bed193d9ba59dd186f0e634cf INFO fetching all commits. This might take a while... INFO starting to process commit 1 of 3065 (0.03%): a6f41a46a54c47e4225adbcca251ce8204f9bb1c ... ``` We still have to mangle the outputs together but this will be part of another PR. Signed-off-by: Sascha Grunert <[email protected]>
I'd like to point out that the |
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.
I think just using latest patch or minor would be fine for initial implementation :) I have tried to keep in mind that our first goal is getting functionality currently in bash scripts transferred over to krel
, then going about making it general purpose so it can potentially be used outside of just kubernetes release.
@@ -230,34 +231,61 @@ func (r *Repo) LatestNonPatchFinalToLatest() (start, end string, err error) { | |||
return start, end, nil | |||
} | |||
|
|||
func (r *Repo) latestNonPatchFinalVersion() (semver.Version, error) { | |||
latestFinalTag := semver.Version{} | |||
func (r *Repo) LatestNonPatchFinalToMinor() (start, end string, err error) { |
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.
@saschagrunert are you planning to include tests for LatesteNonPatch*
methods in a subsequent PR?
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.
Oh yeah sure I was planning to bump the test coverage in the git package in the near future :)
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hasheddan, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
We're now able to generate changelogs for the two needed use cases:
A patch release:
A minor release (no branch needed because the defalut is the
master
branch):We still have to mangle the outputs together but this will be part of
another PR.