Skip to content

Commit

Permalink
extend to handle version in CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderme committed Oct 30, 2022
1 parent f8c54fd commit b92a866
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions updateVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<string>' | 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`
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b92a866

Please sign in to comment.