Hello guys i have tried following ways but none of them helped me to increase it without having any error on command line.
My current build number is 1.4.0 , i wanna get 1.5.0..
BUNDLE_VERSION=$(/usr/libexec/PlistBuddy -c "Print:CFBundleShortVersionString" <my plist path>)
BUILD_NUMBER=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" <my plist path>)
#BUILD_NUMBER=`echo $BUILD_NUMBER +1|bc` //have tried this one first but didnt work
BUILD_NUMBER=$((BUILD_NUMBER+=1)) //that one also didnt help
Any idea?
BUILD_NUMBER=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" <my plist path>)
echo $BUILD_NUMBER
NEWSUBVERSION=`echo $BUILD_NUMBER | awk -F "." '{print $3}'`
NEWSUBVERSION=$(($NEWSUBVERSION + 1))
NEWVERSIONSTRING=`echo $BUILD_NUMBER | awk -F "." '{print $1 "." $2 ".'$NEWSUBVERSION'" }'`
echo $NEWVERSIONSTRING
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${NEWVERSIONSTRING}" <my plist path>