File tree 1 file changed +48
-0
lines changed 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+
3
+ RELEASE=${GIT_TAG:- $1 }
4
+
5
+ if [ -z " ${RELEASE} " ]; then
6
+ echo " Usage:"
7
+ echo " ./scripts/release-notes.sh v0.1.0"
8
+ exit 1
9
+ fi
10
+
11
+ if ! git rev-list ${RELEASE} > /dev/null 2>&1 ; then
12
+ echo " ${RELEASE} does not exist"
13
+ exit
14
+ fi
15
+
16
+ PREV_RELEASE=${PREV_RELEASE:- $(git describe --tags --abbrev=0 ${RELEASE} ^)}
17
+ PREV_RELEASE=${PREV_RELEASE:- $(git rev-list --max-parents=0 ${RELEASE} ^)}
18
+ NOTABLE_CHANGES=$( git cat-file -p ${RELEASE} | sed ' /-----BEGIN PGP SIGNATURE-----/,//d' | tail -n +6)
19
+ CHANGELOG=$( git log --no-merges --pretty=format:' - [%h] %s (%aN)' ${PREV_RELEASE} ..${RELEASE} )
20
+ if [ $? -ne 0 ]; then
21
+ echo " Error creating changelog"
22
+ exit 1
23
+ fi
24
+
25
+ cat << EOF
26
+ ${NOTABLE_CHANGES}
27
+
28
+ ## Docker Images for sameersbn/postgresql:${RELEASE}
29
+
30
+ - [docker.io](https://hub.docker.com/r/sameersbn/postgresql/tags)
31
+ - [quay.io](https://quay.io/repository/sameersbn/postgresql?tag=${RELEASE} &tab=tags)
32
+
33
+ ## Installation
34
+
35
+ For installation and usage instructions please refer to the [README](https://github.com/sameersbn/docker-postgresql/blob/${RELEASE} /README.md)
36
+
37
+ ## Contributing
38
+
39
+ If you find this image useful here's how you can help:
40
+
41
+ - Send a Pull Request with your awesome new features and bug fixes
42
+ - Be a part of the community and help resolve [issues](https://github.com/sameersbn/docker-postgresql/issues)
43
+ - Support the development of this image with a [donation](http://www.damagehead.com/donate/)
44
+
45
+ ## Changelog
46
+
47
+ ${CHANGELOG}
48
+ EOF
You can’t perform that action at this time.
0 commit comments