From b92a86634d2e1a3848ac15b7666f08a6e0b90767 Mon Sep 17 00:00:00 2001 From: Jan Sundermeyer Date: Sun, 30 Oct 2022 10:01:19 +0100 Subject: [PATCH] extend to handle version in CMakeLists.txt --- updateVersion.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/updateVersion.sh b/updateVersion.sh index baa68b5..b2936e6 100755 --- a/updateVersion.sh +++ b/updateVersion.sh @@ -8,6 +8,7 @@ TXS_VERSION_CHANGELOG=`grep TeXstudio utilities/manual/CHANGELOG.txt | head -1 | TXS_VERSION_DEBIAN_CHANGELOG=`head -1 debian/changelog | grep -oE [0-9.]+ ` TXS_VERSION_SPEC=`grep Version: utilities/texstudio.spec | head -1 | grep -oE "[0-9.]+"` TXS_VERSION_INFOPLIST=$(grep -A 1 CFBundleShortVersionString Info.plist | grep '' | grep -oE "[0-9.]*") +TXS_VERSION_CMAKE=`grep ' VERSION' CMakeLists.txt | grep -oE [0-9.]+` TXS_MAJOR=`echo $TXS_VERSION_CPP |cut -d "." -f 1` TXS_MINOR=`echo $TXS_VERSION_CPP |cut -d "." -f 2` TXS_BUILD=`echo $TXS_VERSION_CPP |cut -d "." -f 3` @@ -42,6 +43,10 @@ if [[ $TXS_VERSION_CPP != $TXS_VERSION_INFOPLIST ]]; then echo "update Info.plist" sed -i "s/$TXS_VERSION_INFOPLIST/$TXS_VERSION_CPP/" Info.plist fi +if [[ $TXS_VERSION_CPP != $TXS_VERSION_CMAKE ]]; then + echo "update CMakeLists.txt" + sed -i "s/ VERSION [0-9.]\+/ VERSION $TXS_VERSION_CPP/" CMakeLists.txt +fi if [[ $TXS_NSI_MAJOR != $TXS_MAJOR ]]; then echo "update texstudio.nsi \(major\)" sed -i "s/VERSIONMAJOR [0-9]\+/VERSIONMAJOR $TXS_MAJOR/" utilities/texstudio.nsi