-
Notifications
You must be signed in to change notification settings - Fork 4.3k
GH-51098: [Release] Update CHANGELOG.md as a post release task #51117
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| include ../../LICENSE.txt | ||
| include ../../NOTICE.txt | ||
|
|
||
| include archery/reports/* | ||
| include archery/templates/* | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3830f05 introduced |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,13 +67,14 @@ def release_changelog_add(obj, version): | |
|
|
||
| # just handle the current version | ||
| release = Release(version, repo=repo, issue_tracker=issue_tracker) | ||
| if release.is_released: | ||
| raise ValueError('This version has been already released!') | ||
|
|
||
| changelog = release.changelog() | ||
| changelog_path = pathlib.Path(repo) / 'CHANGELOG.md' | ||
|
|
||
| current_content = changelog_path.read_text() | ||
| if f'# Apache Arrow {version} (' in current_content: | ||
| raise ValueError( | ||
| f'CHANGELOG.md already contains the changelog of {version}!') | ||
|
Comment on lines
+75
to
+77
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may not need this check. |
||
| new_content = changelog.render('markdown') + current_content | ||
|
|
||
| changelog_path.write_text(new_content) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ fi | |
|
|
||
| : ${BUMP_DEFAULT:=1} | ||
| : ${BUMP_UPDATE_LOCAL_DEFAULT_BRANCH:=${BUMP_DEFAULT}} | ||
| : ${BUMP_CHANGELOG:=${BUMP_DEFAULT}} | ||
| : ${BUMP_VERSION_POST_TAG:=${BUMP_DEFAULT}} | ||
| : ${BUMP_DEB_PACKAGE_NAMES:=${BUMP_DEFAULT}} | ||
| : ${BUMP_LINUX_PACKAGES:=${BUMP_DEFAULT}} | ||
|
|
@@ -70,6 +71,13 @@ if [ ${BUMP_UPDATE_LOCAL_DEFAULT_BRANCH} -gt 0 ]; then | |
| git rebase upstream/${DEFAULT_BRANCH} | ||
| fi | ||
|
|
||
| if [ ${BUMP_CHANGELOG} -gt 0 ]; then | ||
| echo "Updating CHANGELOG.md for ${version}" | ||
| archery release --src "${ARROW_DIR}" changelog add "${version}" | ||
| git add "${ARROW_DIR}/CHANGELOG.md" | ||
| git commit -m "MINOR: [Release] Update CHANGELOG.md for ${version}" | ||
| fi | ||
|
Comment on lines
+74
to
+79
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't feel too strongly about needing to rename the file. |
||
|
|
||
| if [ ${BUMP_VERSION_POST_TAG} -gt 0 ]; then | ||
| echo "Updating versions for ${next_version_snapshot}" | ||
| update_versions "${version}" "${next_version}" "snapshot" | ||
|
|
||
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.
Copied existing entries from
CHANGELOG.mdin existing tags.