Skip to content

Commit

Permalink
Feat: add generate release note script
Browse files Browse the repository at this point in the history
Signed-off-by: tico88612 <[email protected]>
  • Loading branch information
tico88612 authored and fedepaol committed Apr 22, 2024
1 parent 1f7c695 commit 7ed2089
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions hack/gen_relnotes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash -e
set -x

if [[ ! -v GITHUB_TOKEN ]]; then
echo "GITHUB_TOKEN is not set, please set it with a token with read permissions on commits and PRs"
exit 1
fi

script_dir=$(dirname "$(readlink -f "$0")")

branch=$1
from=$2
to=$3
release_notes=$(mktemp)

end() {
rm $release_notes
}

trap end EXIT SIGINT SIGTERM SIGSTOP

GOFLAGS=-mod=mod go run k8s.io/release/cmd/[email protected] \
--branch $branch \
--required-author "" \
--org metallb \
--dependencies=false \
--repo metallb-operator \
--start-sha $from \
--end-sha $to \
--output $release_notes

cat $release_notes


echo "Contributors"
git log --format="%aN" $(git merge-base $to $from)..$to | sort -u | tr '\n' ',' | sed -e 's/,/, /g'

0 comments on commit 7ed2089

Please sign in to comment.