From e5aa2e72655c779a57dacb7255b48c5dd127d374 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 29 May 2019 17:35:33 -0700 Subject: [PATCH 1/3] mkreleaselog: calculate contributors --- bin/mkreleaselog | 66 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/bin/mkreleaselog b/bin/mkreleaselog index b769c348ee1..474ec32b073 100755 --- a/bin/mkreleaselog +++ b/bin/mkreleaselog @@ -9,10 +9,50 @@ alias jq="jq --unbuffered" [[ -n "${REPO_FILTER+x}" ]] || REPO_FILTER="github.com/(ipfs|libp2p|ipld)" [[ -n "${IGNORED_FILES+x}" ]] || IGNORED_FILES='^\(\.gx\|package.json\|\.travis.yml\|go.mod\|go.sum\)$' +NL=$'\n' + msg() { echo "$*" >&2 } +statlog() { + rpath="$GOPATH/src/$1" + start="${2:-}" + end="${3:-HEAD}" + git -C "$rpath" log --shortstat --no-merges --pretty="tformat:%H%n%aN%n%aE" "$start..$end" | while + read hash + read name + read email + read _ # empty line + read changes + do + changed=0 + insertions=0 + deletions=0 + while read count event; do + if [[ "$event" =~ ^file ]]; then + changed=$count + elif [[ "$event" =~ ^insertion ]]; then + insertions=$count + elif [[ "$event" =~ ^deletion ]]; then + deletions=$count + else + echo "unknown event $event" >&2 + exit 1 + fi + done<<<"${changes//,/$NL}" + + jq -n \ + --arg "hash" "$hash" \ + --arg "name" "$name" \ + --arg "email" "$email" \ + --argjson "changed" "$changed" \ + --argjson "insertions" "$insertions" \ + --argjson "deletions" "$deletions" \ + '{Commit: $hash, Author: $name, Email: $email, Files: $changed, Insertions: $insertions, Deletions: $deletions}' + done +} + # Returns a stream of deps changed between $1 and $2. dep_changes() { { @@ -46,7 +86,7 @@ release_log() { grep -v "${IGNORED_FILES}" >/dev/null || continue local desc="$(git -C "$dir" show --summary --format='tformat:%b' "$commit" | head -1)" - printf "- %s ([%s#%s](https://%s/pull/%s))\n" "$desc" "$ghname" "$prnum" "$repo" "$prnum" + printf -- "- %s ([%s#%s](https://%s/pull/%s))\n" "$desc" "$ghname" "$prnum" "$repo" "$prnum" done } @@ -75,6 +115,11 @@ ensure() { git -C "$rpath" rev-parse --verify "$commit" >/dev/null || return 1 } +statsummary() { + jq -s 'group_by(.Author)[] | {Author: .[0].Author, Commits: (. | length), Insertions: (map(.Insertions) | add), Deletions: (map(.Deletions) | add), Files: (map(.Files) | add)}' | + jq '. + {Lines: (.Deletions + .Insertions)}' +} + recursive_release_log() { local start="${1:-$(git tag -l | sort -V | grep -v -- '-rc' | grep 'v'| tail -n1)}" local end="${2:-$(git rev-parse HEAD)}" @@ -95,24 +140,37 @@ recursive_release_log() { rm -f go.mod go.sum - printf "Generating Changelog for %s %s..%s\n" "$package" "$start" "$end" >&2 + printf -- "Generating Changelog for %s %s..%s\n" "$package" "$start" "$end" >&2 - printf "- %s:\n" "$package" + printf -- "- %s:\n" "$package" release_log "$package" "$start" "$end" | indent + statlog "$package" "$start" "$end" > statlog.json + dep_changes old_deps.json new_deps.json | jq --arg filter "$REPO_FILTER" 'select(.Path | match($filter))' | # Compute changelogs jq -r '"\(.Path) \(.New.Version) \(.New.Ref) \(.Old.Version) \(.Old.Ref // "")"' | while read repo new new_ref old old_ref; do ensure "$repo" "$new_ref" + statlog "$repo" "$old_ref" "$new_ref" >> statlog.json local changelog="$(release_log "$repo" "$old_ref" "$new_ref")" if [[ -n "$changelog" ]]; then - printf "- %s (%s -> %s):\n" "$repo" "$old" "$new" + printf -- "- %s (%s -> %s):\n" "$repo" "$old" "$new" echo "$changelog" | indent fi done + + echo + echo "Contributors" + echo + + echo "| Contributor | Commits | Lines ± | Files Changed |" + echo "|-------------|---------|---------|---------------|" + statsummary Date: Wed, 29 May 2019 17:36:13 -0700 Subject: [PATCH 2/3] CHANGELOG: add contributors to 0.4.21 notes --- CHANGELOG.md | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 932f0d5957f..5b249800cd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # go-ipfs changelog -## 0.4.21 2019-05-28 +## 0.4.21 2019-05-30 We're happy to announce go-ipfs 0.4.21. This release has some critical bug fixes and a handful of new features so every user should upgrade. @@ -37,6 +37,50 @@ github.com/libp2p/go-libp2p-secio to _at least_ v0.0.3. [secio-bug]: https://github.com/libp2p/go-libp2p/issues/644 +### Contributors + +First off, we'd like to give a shout-out to all contributors that participated +in this release (including contributions to ipld, libp2p, and multiformats): + +| Contributor | Commits | Lines ± | Files Changed | +|----------------------------|---------|-------------|---------------| +| Steven Allen | 220 | +6078/-4211 | 520 | +| Łukasz Magiera | 53 | +5039/-4557 | 274 | +| vyzo | 179 | +2929/-1704 | 238 | +| Raúl Kripalani | 44 | +757/-1895 | 134 | +| hannahhoward | 11 | +755/-1005 | 49 | +| Marten Seemann | 16 | +862/-203 | 44 | +| keks | 10 | +359/-110 | 12 | +| Jan Winkelmann | 8 | +368/-26 | 16 | +| Jakub Sztandera | 4 | +361/-8 | 7 | +| Adrian Lanzafame | 1 | +287/-18 | 5 | +| Erik Ingenito | 4 | +247/-28 | 8 | +| Reid 'arrdem' McKenzie | 1 | +220/-20 | 3 | +| Yusef Napora | 26 | +98/-130 | 26 | +| Michael Avila | 3 | +116/-59 | 8 | +| Raghav Gulati | 13 | +145/-26 | 13 | +| tg | 1 | +41/-33 | 1 | +| Matt Joiner | 6 | +41/-30 | 7 | +| Cole Brown | 1 | +37/-25 | 1 | +| Dominic Della Valle | 2 | +12/-40 | 4 | +| Overbool | 1 | +50/-0 | 2 | +| Christopher Buesser | 3 | +29/-16 | 10 | +| myself659 | 1 | +38/-5 | 2 | +| Alex Browne | 3 | +30/-8 | 3 | +| jmank88 | 1 | +27/-4 | 2 | +| Vikram | 1 | +25/-1 | 2 | +| MollyM | 7 | +17/-9 | 7 | +| Marcin Rataj | 1 | +17/-1 | 1 | +| requilence | 1 | +11/-4 | 1 | +| Teran McKinney | 1 | +8/-2 | 1 | +| Oli Evans | 1 | +5/-5 | 1 | +| Masashi Salvador Mitsuzawa | 1 | +5/-1 | 1 | +| chenminjian | 1 | +4/-0 | 1 | +| Edgar Lee | 1 | +3/-1 | 1 | +| Dirk McCormick | 1 | +2/-2 | 2 | +| ia | 1 | +1/-1 | 1 | +| Alan Shaw | 1 | +1/-1 | 1 | + ### Bug Fixes And Enhancements This release includes quite a number of critical bug fixes and From 1d67e0ac265fd548e7a1d12681ebaeb3251c64ec Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 29 May 2019 17:36:41 -0700 Subject: [PATCH 3/3] RELEASE: bump version --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index e30979c5ba2..9ce7d097026 100644 --- a/version.go +++ b/version.go @@ -4,6 +4,6 @@ package ipfs var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.4.21-rc3" +const CurrentVersionNumber = "0.4.21" const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/"