Skip to content

Commit 9ad463c

Browse files
szuecsmikkeloscar
authored andcommitted
fix release notes automation (#173)
* fix release notes automation Signed-off-by: Sandor Szücs <[email protected]> * only show merge message and not all commit messages in changelog Signed-off-by: Sandor Szücs <[email protected]> * migrate release notes to use a tempfile, which preserves newlines and is easier to handle Signed-off-by: Sandor Szücs <[email protected]> * use -e to render newlines Signed-off-by: Sandor Szücs <[email protected]>
1 parent 275b256 commit 9ad463c

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

delivery.yaml

+12-18
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,15 @@ pipeline:
9090
git diff --stat --exit-code
9191
IMAGE=$IMAGE VERSION=$VERSION make build.push
9292
echo "create release page"
93-
GITMSG=$(git log -1 --pretty=%B | grep -v 'Signed-off-by:' | grep -v -E '^\s*$' | tail -n +2)
94-
MSG=$(cat <<"EOF"
95-
### Changes
96-
97-
GITMSG
98-
99-
### Docker image
100-
101-
Docker image is available in Zalando's Open Source registry:
102-
103-
```
104-
docker run -it registry.opensource.zalan.do/teapot/stackset-controller:VERSION --help
105-
```
106-
EOF
107-
)
108-
MSG=$(echo $MSG | sed "s/VERSION/$VERSION/")
109-
MSG=$(echo $MSG | sed "s/GITMSG/$GITMSG/")
110-
git gh-release -m "${MSG}" $VERSION
93+
tf=$(mktemp)
94+
echo -e "### Changes\n" >$tf
95+
git log -1 --pretty=%B | grep -v 'Signed-off-by:' | grep -v -E '^\s*$' | grep -vE '^\*' >>$tf
96+
echo -e "\n### Docker image\n" >>$tf
97+
echo -e "Docker image is available in Zalando's Open Source registry:\n" >>$tf
98+
echo -e '```' >>$tf
99+
echo -e "docker run -it registry.opensource.zalan.do/teapot/stackset-controller:${VERSION} --help" >>$tf
100+
echo -e '```' >>$tf
101+
echo "################################"
102+
cat $tf
103+
echo "################################"
104+
git gh-release --message-from-file "${tf}" $VERSION

0 commit comments

Comments
 (0)