forked from cli/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The changelog is generated using the git log of pull request merges since the last tagged release, and is in the following format: * {PR title} #{PR number}
- Loading branch information
Showing
4 changed files
with
24 additions
and
8 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
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
/dist | ||
/site | ||
.github/**/node_modules | ||
/CHANGELOG.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,10 +39,3 @@ nfpms: | |
formats: | ||
- deb | ||
- rpm | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
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,20 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
current_tag="${GITHUB_REF#refs/tags/}" | ||
start_ref="HEAD" | ||
|
||
# Find the previous release on the same branch, skipping prereleases if the | ||
# current tag is a full release | ||
previous_tag="" | ||
while [[ -z $previous_tag || ( $previous_tag == *-* && $current_tag != *-* ) ]]; do | ||
previous_tag="$(git describe --tags "$start_ref"^ --abbrev=0)" | ||
start_ref="$previous_tag" | ||
done | ||
|
||
git log "$previous_tag".. --reverse --merges --oneline --grep='Merge pull request #' | \ | ||
while read -r sha title; do | ||
pr_num="$(grep -o '#[[:digit:]]\+' <<<"$title")" | ||
pr_desc="$(git show -s --format=%b "$sha" | sed -n '1,/^$/p' | tr $'\n' ' ')" | ||
printf "* %s %s\n\n" "$pr_desc" "$pr_num" | ||
done |