mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 14:00:47 +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")"
|
cd "$(dirname "$0")"
|
||||||
ROOT=$(pwd)
|
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
|
||||||
|
|
|
||||||
7
tag.sh
7
tag.sh
|
|
@ -6,5 +6,12 @@ ROOT=$(pwd)
|
||||||
cd $ROOT
|
cd $ROOT
|
||||||
|
|
||||||
VER=`cat VERSION`
|
VER=`cat VERSION`
|
||||||
|
|
||||||
|
# Check that the version exists in the Changelist.txt
|
||||||
|
if ! grep -q "^${VER}:*$" Changelist.txt; then
|
||||||
|
echo "Error: Version $VER not found in Changelist.txt"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Tagging [$VER]"
|
echo "Tagging [$VER]"
|
||||||
git tag "$VER" && git push origin "$VER"
|
git tag "$VER" && git push origin "$VER"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue