-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support continuous report generation
Generate CHANGELOG.md and CHANGELOG_CURRENT.md with `make reno-report` in order to commit them on pre-release step. Pick up CHANGELOG_CURRENT.md on `make gorelease`
- Loading branch information
Showing
6 changed files
with
50 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
/dist | ||
**/*.swp | ||
/.idea | ||
/releasenotes/config.yaml |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
version=${1:-"''"} | ||
|
||
## Latest notes should go to current version | ||
## We generate report before tagging the repo, so we need to set this version here | ||
# echo "unreleased_version_title: ${version}" > reno.yaml | ||
sed "s/unreleased_version_title: ''/unreleased_version_title: ${version}/g" reno.yaml > releasenotes/config.yaml | ||
|
||
|
||
# Update changelog for all versions: | ||
|
||
## Generate rst report | ||
echo reno report --output ./CHANGELOG.rst | ||
reno report --output ./CHANGELOG.rst | ||
|
||
## Convert rst to markdown | ||
rst2md ./CHANGELOG.rst --output ./CHANGELOG.md | ||
|
||
# Generate changelof for current version only: | ||
|
||
## Reno `--version` flag does not support "unreleased" setting and requires specific version, event if it's dynamic | ||
## To generate dynamic version, use `reno list`. | ||
## It will be replaced by `unreleased_version_title` setting in the actual report file | ||
UNRELEASED_VERSION=$(reno list 2>/dev/null | grep -E "^[0-9]+\.[0-9]+\.[0-9]+\-[0-9]+") | ||
|
||
## Generate rst report | ||
echo reno report --version=${UNRELEASED_VERSION} --output ./CHANGELOG_CURRENT.rst | ||
reno report --version=${UNRELEASED_VERSION} --output ./CHANGELOG_CURRENT.rst | ||
## Convert rst to markdown | ||
rst2md ./CHANGELOG_CURRENT.rst --output ./CHANGELOG_CURRENT.md |
This file contains 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
This file contains 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
This file contains 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