Update build and release pipeline, match with btools

Automatic uploads and releasing when new versions are tagged
This commit is contained in:
icex2
2022-06-19 13:51:48 +02:00
parent b23e855bc2
commit d415cd7640
3 changed files with 145 additions and 34 deletions
+28
View 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
>&2 echo "Could not find version in changelog: $VERSION"
exit 1
fi