🔧 misc(release): add author link only on full changelog
Makes it easier to auto-release with `cd.yml`, as release descriptions automatically link to GitHub profiles based on the handle.
This commit is contained in:
parent
46ad1f011e
commit
8de049a2b5
@ -40,7 +40,7 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR.
|
|||||||
- *(git-sumi)* Improve emoji matching ([e373482](https://github.com/welpo/tabi/commit/e3734829460d4f93643e7d8fc4a33670f5bb9c6e)) by [@welpo](https://github.com/welpo)
|
- *(git-sumi)* Improve emoji matching ([e373482](https://github.com/welpo/tabi/commit/e3734829460d4f93643e7d8fc4a33670f5bb9c6e)) by [@welpo](https://github.com/welpo)
|
||||||
- *(link_checker)* Skip vultr.com links ([0158097](https://github.com/welpo/tabi/commit/0158097594f1d19653f2b68c4fedf802342aa8ad)) by [@welpo](https://github.com/welpo)
|
- *(link_checker)* Skip vultr.com links ([0158097](https://github.com/welpo/tabi/commit/0158097594f1d19653f2b68c4fedf802342aa8ad)) by [@welpo](https://github.com/welpo)
|
||||||
- *(projects)* Load git-sumi demo from its repo ([7b13798](https://github.com/welpo/tabi/commit/7b13798a68110d1da63870ea95230ece84526a8b)) by [@welpo](https://github.com/welpo)
|
- *(projects)* Load git-sumi demo from its repo ([7b13798](https://github.com/welpo/tabi/commit/7b13798a68110d1da63870ea95230ece84526a8b)) by [@welpo](https://github.com/welpo)
|
||||||
- *(release)* Remove link comparison ([e2358f7](https://github.com/welpo/tabi/commit/e2358f7edfc2944e34bc59cbe4b1cbff64412f21))
|
- *(release)* Remove link comparison ([e2358f7](https://github.com/welpo/tabi/commit/e2358f7edfc2944e34bc59cbe4b1cbff64412f21)) by [@welpo](https://github.com/welpo)
|
||||||
- *(release)* Update CHANGELOG format ([5b5d1fa](https://github.com/welpo/tabi/commit/5b5d1fa592b72b50e1fccf172d9245a9e087bfd3)) by [@welpo](https://github.com/welpo)
|
- *(release)* Update CHANGELOG format ([5b5d1fa](https://github.com/welpo/tabi/commit/5b5d1fa592b72b50e1fccf172d9245a9e087bfd3)) by [@welpo](https://github.com/welpo)
|
||||||
- Add renovate config ([3672a94](https://github.com/welpo/tabi/commit/3672a94e863a44e88b1ec0e1896ac6ef38833ef7)) by [@welpo](https://github.com/welpo)
|
- Add renovate config ([3672a94](https://github.com/welpo/tabi/commit/3672a94e863a44e88b1ec0e1896ac6ef38833ef7)) by [@welpo](https://github.com/welpo)
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ footer = """
|
|||||||
"""
|
"""
|
||||||
# postprocessors
|
# postprocessors
|
||||||
postprocessors = [
|
postprocessors = [
|
||||||
{ pattern = " @([a-zA-Z0-9](?:[a-zA-Z0-9]+-?)*[a-zA-Z0-9])", replace = " [@$1](https://github.com/$1)"}, # add link to GitHub usernames
|
# { pattern = " @([a-zA-Z0-9](?:[a-zA-Z0-9]+-?)*[a-zA-Z0-9])", replace = " [@$1](https://github.com/$1)"}, # add link to GitHub usernames (done in release script instead)
|
||||||
]
|
]
|
||||||
|
|
||||||
[git]
|
[git]
|
||||||
|
3
release
3
release
@ -40,6 +40,7 @@ echo
|
|||||||
|
|
||||||
# Update CHANGELOG.
|
# Update CHANGELOG.
|
||||||
git cliff --tag "$VERSION_TAG" -o CHANGELOG.md
|
git cliff --tag "$VERSION_TAG" -o CHANGELOG.md
|
||||||
|
sed -i.bak -e 's/ @\([a-zA-Z0-9]\([-a-zA-Z0-9]*[a-zA-Z0-9]\)\?\)/ [@\1](https:\/\/github.com\/\1)/g' CHANGELOG.md && rm CHANGELOG.md.bak
|
||||||
|
|
||||||
# Add all changes and commit.
|
# Add all changes and commit.
|
||||||
git add -A
|
git add -A
|
||||||
@ -56,8 +57,6 @@ changelog=$(echo "$changelog" | sed -E 's/\[\#([0-9]+)\]\(https:\/\/github\.com\
|
|||||||
changelog=$(echo "$changelog" | sed -E 's/\[([0-9a-f]+)\]\(https:\/\/github\.com\/welpo\/[^\/]+\/commit\/([0-9a-f]+)\)/\1/g')
|
changelog=$(echo "$changelog" | sed -E 's/\[([0-9a-f]+)\]\(https:\/\/github\.com\/welpo\/[^\/]+\/commit\/([0-9a-f]+)\)/\1/g')
|
||||||
# Remove scopes.
|
# Remove scopes.
|
||||||
changelog=$(echo "$changelog" | sed -E 's/\*\(([^)]+)\)\* //g')
|
changelog=$(echo "$changelog" | sed -E 's/\*\(([^)]+)\)\* //g')
|
||||||
# Remove @author links, leaving just the username.
|
|
||||||
changelog=$(echo "$changelog" | sed -E 's/\[\@([a-zA-Z0-9_]+)\]\(https:\/\/github\.com\/[a-zA-Z0-9_]+\)/@\1/g')
|
|
||||||
# Remove markdown headers.
|
# Remove markdown headers.
|
||||||
changelog=$(echo "$changelog" | sed -E 's/^#+ //g')
|
changelog=$(echo "$changelog" | sed -E 's/^#+ //g')
|
||||||
# Remove version comparison lines.
|
# Remove version comparison lines.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user