Skip to content
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

Remove unused changelog-update script #983

Merged
merged 1 commit into from
Dec 17, 2019
Merged

Remove unused changelog-update script #983

merged 1 commit into from
Dec 17, 2019

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented Dec 16, 2019

The changelog-update is not used inside this repository, because its main functionality is part of anago and relnotes.

This might be a dangerous change since I'm not sure if we have other repositories depending on this script. 😇 On the other hand I'm pretty sure that this is the code part which has been put into anago some time ago which replaces this script and makes it obsolete:

release/anago

Lines 440 to 502 in 397563c

generate_release_notes () {
local release_tars=$TREE_ROOT/_output-$RELEASE_VERSION_PRIME/release-tars
local action="Update"
logecho -n "Generating release notes: "
logrun -s relnotes $RELEASE_VERSION_PRIME --release-tars=$release_tars \
--branch=${PARENT_BRANCH:-$RELEASE_BRANCH} --htmlize-md \
--markdown-file=$RELEASE_NOTES_MD \
--html-file=$RELEASE_NOTES_HTML \
--release-bucket=$RELEASE_BUCKET || return 1
logecho -n "Checkout master branch to make changes: "
logrun -s git checkout master || return 1
# The fetch and rebase before editing $CHANGELOG_FILE
# avoids merge conflicts if another release cut
# completed while we were building this one.
logecho -n "Fetch origin/master to get latest $CHANGELOG_FILE: "
logrun -s git fetch origin master || return 1
logecho -n "Rebase on origin/master before editing $CHANGELOG_FILE: "
logrun -s git rebase origin/master || return 1
if [[ ! -f $CHANGELOG_FILE ]]; then
cat<<EOF > $CHANGELOG_FILE
<!-- BEGIN MUNGE: GENERATED_TOC -->
<!-- END MUNGE: GENERATED_TOC -->
<!-- NEW RELEASE NOTES ENTRY -->
EOF
action="Add"
logecho -n "$CHANGELOG_FILE not found. Creating: "
logrun -s git add $CHANGELOG_FILE
fi
logecho -n "Insert $RELEASE_VERSION_PRIME notes into $CHANGELOG_FILE: "
# Pipe to logrun() vs using directly, because quoting.
sed -i -e 's/<!-- NEW RELEASE NOTES ENTRY -->/&\n/' \
-e "/<!-- NEW RELEASE NOTES ENTRY -->/r $RELEASE_NOTES_MD" \
$CHANGELOG_FILE | logrun -s
logecho -n "Update $CHANGELOG_FILE TOC: "
logrun -s common::mdtoc $CHANGELOG_FILE || return 1
logecho -n "Committing $CHANGELOG_FILE: "
logrun -s git commit -am \
"$action $CHANGELOG_FILE for $RELEASE_VERSION_PRIME." \
|| return 1
# Sync $CHANGELOG_FILE to release-* branch and clear all others
if [[ "$RELEASE_BRANCH" =~ release- ]]; then
logecho -n "Checkout $RELEASE_BRANCH branch to make changes: "
logrun -s git checkout $RELEASE_BRANCH || return 1
logecho -n "Remove any previous CHANGELOG-*.md files: "
logrun -s git rm -f CHANGELOG-*.md || return 1
logecho -n "Copy master $CHANGELOG_FILE to $RELEASE_BRANCH branch: "
logrun -s git checkout master -- $CHANGELOG_FILE || return 1
logecho -n "Committing $CHANGELOG_FILE: "
logrun -s git commit -am \
"Add/Update $CHANGELOG_FILE for $RELEASE_VERSION_PRIME." \
|| return 1
fi
}

Relates to #982

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 16, 2019
@k8s-ci-robot
Copy link
Contributor

@saschagrunert: Adding label: do-not-merge/blocked-paths because PR changes a protected file.

Reasons for blocking this PR:

[Changes to certain release tools can affect our ability to test, build, and release Kubernetes. This PR must be explicitly approved by SIG Release repo admins.]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. labels Dec 16, 2019
Copy link
Member

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saschagrunert -- Hound comes back with no significant entries: https://cs.k8s.io/?q=changelog-update&i=nope&files=&repos=, so I'm in favor of cleaning up!

Can you remove the listing for changelog-update in the README.md?

The `changelog-update` is not used inside this repository, because its
main functionality is part of `anago` and `relnotes`.

Signed-off-by: Sascha Grunert <[email protected]>
@saschagrunert
Copy link
Member Author

Yes, I changed the README.md as well
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 17, 2019
@justaugustus justaugustus removed the do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. label Dec 17, 2019
@justaugustus
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 17, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2019
@k8s-ci-robot k8s-ci-robot merged commit 1d3b96d into kubernetes:master Dec 17, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Dec 17, 2019
@saschagrunert saschagrunert deleted the rm-changelog-update branch December 17, 2019 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants