From e796fffc7c5db4baefab57a25642f79dce618450 Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Tue, 25 Sep 2018 14:23:47 +0200 Subject: [PATCH] Prepare release script for real versions --- CMakeLists.txt | 2 +- build/scripts/release_patch_version.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d1b658..30d089a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/build/scripts/release_patch_version.sh b/build/scripts/release_patch_version.sh index c79f9e0..82ded79 100644 --- a/build/scripts/release_patch_version.sh +++ b/build/scripts/release_patch_version.sh @@ -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