mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2026-08-22 08:24:02 -05:00
Refine CI/CD pipeline
Make use of GitLab features like the package registry to store dist packages, GitLab releases and broadcast the release to different channels. Overall, this enables developers to be push out releases for frequently since the amount of manual work is reduced.
This commit is contained in:
28
scripts/ci/create-release-message.sh
Executable file
28
scripts/ci/create-release-message.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
VERSION="$1"
|
||||
|
||||
section_active=""
|
||||
changelog_excerpt=""
|
||||
|
||||
while IFS= read -r line; do
|
||||
if [ "$section_active" ]; then
|
||||
if [[ "$(echo "$line" | grep '^#')" ]]; then
|
||||
section_active=""
|
||||
else
|
||||
changelog_excerpt="$(printf "%s\n%s" "$changelog_excerpt" "$line")"
|
||||
fi
|
||||
else
|
||||
if [ "$line" = "## $VERSION" ]; then
|
||||
section_active="1"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$changelog_excerpt" ]; then
|
||||
printf "%s" "$changelog_excerpt"
|
||||
exit 0
|
||||
else
|
||||
echo "Could not find version in changelog: $VERSION"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user