-
Notifications
You must be signed in to change notification settings - Fork 496
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
Clear extraneous CHANGELOG files on a new branch. #519
Clear extraneous CHANGELOG files on a new branch. #519
Conversation
anago
Outdated
# CHANGELOG_FILE to the branch | ||
clear_sync_changelogs () { | ||
logecho -n "Checkout $RELEASE_BRANCH branch to make changes: " | ||
logrun -s git checkout $RELEASE_BRANCH || return 1 |
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'm a little worried that this branch switch is inside a function. You can't tell at the call site that this function will change the meaning of future git commands.
Can we either make the caller responsible for checking out the release branch, or save/restore the previous branch in the function?
77e80a9
to
bbe92c2
Compare
PTAL @enisoc. Thanks for the review! |
anago
Outdated
# describe'd as something other than the current tag on master | ||
# If/when the generate-docs.sh issue is sorted out, this will become | ||
# optional, though probably still useful anyway. | ||
if [[ "$branch" =~ release- ]]; then |
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.
It looks like the $PARENT_BRANCH
check above was causing docs to be generated only at the initial branch point (beta.0), not for subsequent releases. Is that right? If so, is there a reason we wouldn't need that check here too?
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.
And this is why I keep sending you PRs. :) Yes, that is better to keep that logic here as well.
bbe92c2
to
8e84644
Compare
# optional, though probably still useful anyway. | ||
if [[ "$PARENT_BRANCH" == "master" && "$branch" != "master" ]]; then | ||
logecho -n "Remove any previous CHANGELOG-*.md files: " | ||
logrun -s git rm -f CHANGELOG-*.md || return 1 |
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.
It looks like the CHANGELOG for the new release will already exist on master at this point, since it gets populated for alphas. Should we avoid deleting the one that matches the version in the branch name?
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.
Yes, that had got lost of the recent shuffle. Thanks. PTAL.
8e84644
to
8f95a56
Compare
/lgtm |
8f95a56
to
d83d95d
Compare
d83d95d
to
5a9c0cf
Compare
Fixes kubernetes/kubernetes#59895
Fixes kubernetes/sig-release#85