2018-10-04 21:28:39 +00:00
#!/bin/bash
2018-10-04 22:56:55 +00:00
2018-10-04 21:40:48 +00:00
# Copyright 2018 The Kubernetes Authors All rights reserved.
2018-10-04 21:28:39 +00:00
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
2018-10-04 21:40:48 +00:00
2020-08-03 21:21:15 +00:00
set -eu -o pipefail
2018-10-04 21:28:39 +00:00
DIR = $( cd " $( dirname " ${ BASH_SOURCE [0] } " ) " && pwd )
2021-05-04 18:33:02 +00:00
if ! [ [ -r " ${ DIR } /gh_token.txt " ] ] ; then
echo " Missing ' ${ DIR } /gh_token.txt'. Please create a GitHub token at https://github.com/settings/tokens and store in ' ${ DIR } /gh_token.txt'. "
exit 1
fi
2019-10-14 21:16:01 +00:00
install_release_notes_helper( ) {
release_notes_workdir = " $( mktemp -d) "
trap 'rm -rf -- ${release_notes_workdir}' RETURN
# See https://stackoverflow.com/questions/56842385/using-go-get-to-download-binaries-without-adding-them-to-go-mod for this workaround
cd " ${ release_notes_workdir } "
go mod init release-notes
GOBIN = " $DIR " go get github.com/corneliusweig/release-notes
2021-05-04 18:33:02 +00:00
GOBIN = " $DIR " go get github.com/google/pullsheet
2019-10-14 21:16:01 +00:00
cd -
}
2021-05-04 18:33:02 +00:00
if ! [ [ -x " ${ DIR } /release-notes " ] ] || ! [ [ -x " ${ DIR } /pullsheet " ] ] ; then
2019-10-14 21:16:01 +00:00
echo >& 2 'Installing release-notes'
install_release_notes_helper
fi
2021-07-15 20:09:02 +00:00
git pull https://github.com/kubernetes/minikube.git master --tags
2019-12-02 22:46:31 +00:00
recent = $( git describe --abbrev= 0)
2021-05-04 18:33:02 +00:00
recent_date = $( git log -1 --format= %as $recent )
2019-12-02 22:46:31 +00:00
" ${ DIR } /release-notes " kubernetes minikube --since $recent
2018-10-04 21:28:39 +00:00
2021-05-04 18:33:02 +00:00
echo ""
2021-05-04 22:10:33 +00:00
echo "For a more detailed changelog, including changes occuring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md)."
echo ""
2020-12-14 19:43:42 +00:00
echo "Thank you to our contributors for this release!"
echo ""
2019-12-02 22:46:31 +00:00
git log " $recent " .. --format= "%aN" --reverse | sort | uniq | awk '{printf "- %s\n", $0 }'
2021-05-04 18:33:02 +00:00
echo ""
echo "Thank you to our PR reviewers for this release!"
echo ""
2021-05-11 18:41:48 +00:00
AWK_FORMAT_ITEM = '{printf "- %s (%d comments)\n", $2, $1}'
AWK_REVIEW_COMMENTS = 'NR>1{arr[$4] += $6 + $7}END{for (a in arr) printf "%d %s\n", arr[a], a}'
2021-05-11 19:17:03 +00:00
" ${ DIR } /pullsheet " reviews --since " $recent_date " --repos kubernetes/minikube --token-path $DIR /gh_token.txt --logtostderr= false --stderrthreshold= 2 | awk -F ',' " $AWK_REVIEW_COMMENTS " | sort -k1nr -k2d | awk -F ' ' " $AWK_FORMAT_ITEM "
2021-05-04 22:01:17 +00:00
echo ""
echo "Thank you to our triage members for this release!"
echo ""
2021-05-11 18:41:48 +00:00
AWK_ISSUE_COMMENTS = 'NR>1{arr[$4] += $7}END{for (a in arr) printf "%d %s\n", arr[a], a}'
2021-05-11 19:17:03 +00:00
" ${ DIR } /pullsheet " issue-comments --since " $recent_date " --repos kubernetes/minikube --token-path $DIR /gh_token.txt --logtostderr= false --stderrthreshold= 2 | awk -F ',' " $AWK_ISSUE_COMMENTS " | sort -k1nr -k2d | awk -F ' ' " $AWK_FORMAT_ITEM " | head -n 5
2021-05-19 22:14:24 +00:00
2021-05-21 23:28:25 +00:00
if [ [ " $recent " != *"beta" * ] ] ; then
echo ""
echo " Check out our [contributions leaderboard](https://minikube.sigs.k8s.io/docs/contrib/leaderboard/ $recent /) for this release! "
fi
2021-05-19 22:14:24 +00:00
echo ""
2021-05-26 23:44:21 +00:00
echo "Don't forget to run `make update-leaderboard` & `make time-to-k8s-benchmark`!"