20 lines
669 B
Bash
20 lines
669 B
Bash
#!/bin/sh
|
|
|
|
# Get the current patch version
|
|
LAST_VERSION=$(egrep -o 'breakhack_PATCH_VERSION [0-9]+' CMakeLists.txt | awk '{print $2}')
|
|
NEXT_VERSION=$((LAST_VERSION + 1))
|
|
|
|
# Update the version and create release notes
|
|
sed -i -e "s/breakhack_PATCH_VERSION [0-9]\+/breakhack_PATCH_VERSION $NEXT_VERSION/" CMakeLists.txt
|
|
git log --oneline early-access-v$LAST_VERSION..early-access-v$NEXT_VERSION > build/releasenotes/early-access-v$NEXT_VERSION
|
|
git add build/releasenotes/early-access-v$NEXT_VERSION
|
|
git commit -a -m"Patch version raised to $NEXT_VERSION"
|
|
|
|
# Push to repo
|
|
git push
|
|
|
|
# Create the tag
|
|
git tag early-access-v$NEXT_VERSION
|
|
git push early-access-v$NEXT_VERSION
|
|
|