This repository was archived by the owner on Dec 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ RELEASE=${1:- ${GIT_TAG} }
4+ RELEASE=${RELEASE:- ${CIRCLE_TAG} }
5+
6+ if [ -z " ${RELEASE} " ]; then
7+ echo " Usage:"
8+ echo " release-notes.sh VERSION"
9+ exit 1
10+ fi
11+
12+ if ! git rev-list ${RELEASE} > /dev/null 2>&1 ; then
13+ echo " ${RELEASE} does not exist"
14+ exit
15+ fi
16+
17+ REPO=" knative-lambda-runtime"
18+ BASE_URL=" https://github.com/triggermesh/${REPO} /releases/download/${RELEASE} "
19+ PREV_RELEASE=${PREV_RELEASE:- $(git describe --tags --abbrev=0 ${RELEASE} ^ 2>/ dev/ null)}
20+ PREV_RELEASE=${PREV_RELEASE:- $(git rev-list --max-parents=0 ${RELEASE} ^ 2>/ dev/ null)}
21+ NOTABLE_CHANGES=$( git cat-file -p ${RELEASE} | sed ' /-----BEGIN PGP SIGNATURE-----/,//d' | tail -n +6)
22+ CHANGELOG=$( git log --no-merges --pretty=format:' - [%h] %s (%aN)' ${PREV_RELEASE} ..${RELEASE} )
23+ if [ $? -ne 0 ]; then
24+ echo " Error creating changelog"
25+ exit 1
26+ fi
27+
28+ RUNTIMES=$( sed -n -e " s/^\(RUNTIMES[[:space:]]*=[[:space:]]*\)\(.*\)$/\2/p" Makefile)
29+ RELEASE_ASSETS_TABLE=$(
30+ echo -n " |" ; for runtime in ${RUNTIMES} ; do echo -n " ${runtime} |" ; done ; echo
31+ echo -n " |" ; for runtime in ${RUNTIMES} ; do echo -n " --|" ; done ; echo
32+ echo -n " |"
33+ for runtime in ${RUNTIMES} ; do
34+ echo -n " [container](https://gcr.io/triggermesh/knative-lambda-$( echo " ${runtime} " | sed -n -e " s/\([[:alnum:]]*\)\(-\)*\([0-9]*\)\(\.\)*\([0-9]*\)\(\.\)*\([0-9]*\).*/\1\3\5\7/p" ) :${RELEASE} )"
35+ echo -n " |"
36+ done
37+ echo
38+ )
39+
40+ cat << EOF
41+ ${NOTABLE_CHANGES}
42+
43+ ## Installation
44+
45+ Download TriggerMesh Knative Lambda Runtime ${RELEASE}
46+
47+ ${RELEASE_ASSETS_TABLE}
48+
49+ ## Changelog
50+
51+ ${CHANGELOG}
52+ EOF
You can’t perform that action at this time.
0 commit comments