Prepare release script for real versions

This commit is contained in:
Linus Probert 2018-09-25 14:23:47 +02:00
parent ae44d5c2bc
commit e796fffc7c
2 changed files with 7 additions and 5 deletions

View File

@ -7,7 +7,7 @@ project(breakhack C)
set(breakhack_GAME_TITLE "BreakHack")
set(breakhack_MAJOR_VERSION 1)
set(breakhack_MINOR_VERSION 1)
set(breakhack_PATCH_VERSION 4)
set(breakhack_PATCH_VERSION 3)
set(breakhack_RELEASE_TYPE "")
include(FindLua)

View File

@ -1,11 +1,13 @@
#!/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))
MAJOR_VERSION=$(egrep -o 'breakhack_MAJOR_VERSION [0-9]+' CMakeLists.txt | awk '{print $2}')
MINOR_VERSION=$(egrep -o 'breakhack_MINOR_VERSION [0-9]+' CMakeLists.txt | awk '{print $2}')
LAST_PATCH_VERSION=$(egrep -o 'breakhack_PATCH_VERSION [0-9]+' CMakeLists.txt | awk '{print $2}')
NEXT_PATCH_VERSION=$((LAST_VERSION + 1))
LAST_TAG=early-access-v$LAST_VERSION
NEXT_TAG=early-access-v$NEXT_VERSION
LAST_TAG=v$MAJOR_VERSION.$MINOR_VERSION.$LAST_PATCH_VERSION
NEXT_TAG=v$MAJOR_VERSION.$MINOR_VERSION.$NEXT_PATCH_VERSION
# Update the version and create release notes
sed -i -e "s/breakhack_PATCH_VERSION [0-9]\+/breakhack_PATCH_VERSION $NEXT_VERSION/" CMakeLists.txt