mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 05:50:46 +02:00
Update tag and release scripts
This commit is contained in:
parent
e93852981a
commit
6c0dc53509
2 changed files with 27 additions and 1 deletions
21
release.sh
21
release.sh
|
|
@ -4,4 +4,23 @@ set -x
|
|||
cd "$(dirname "$0")"
|
||||
ROOT=$(pwd)
|
||||
|
||||
gh release create "$GITHUB_REF_NAME" -F ./Changelist.txt ./Binaries\ Linux/*.zip ./Binaries\ Windows/*.zip ./Binaries\ macOS/*.zip
|
||||
VER="$GITHUB_REF_NAME"
|
||||
|
||||
# Extract the changelog section for the current version
|
||||
# Matches version with optional colon, captures until the next version line or EOF
|
||||
NOTES=$(awk -v ver="$VER" '
|
||||
BEGIN { found=0; printing=0 }
|
||||
$0 ~ "^"ver":?"$ { found=1; printing=1; next }
|
||||
printing && /^[0-9]+\.[0-9]+\.[0-9]+:?$/ { printing=0 }
|
||||
printing { print }
|
||||
END { if (!found) exit 1 }
|
||||
' ./Changelist.txt)
|
||||
|
||||
if [ $? -ne 0 ] || [ -z "$NOTES" ]; then
|
||||
echo "Error: Version $VER not found in Changelist.txt or has no content"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$NOTES" > /tmp/release_notes.txt
|
||||
|
||||
gh release create "$VER" -F /tmp/release_notes.txt ./Binaries\ Linux/*.zip ./Binaries\ Windows/*.zip ./Binaries\ macOS/*.zip
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue