about summary refs log tree commit diff
path: root/scripts/bumpIosBuildNumber.sh
blob: b78d2e69dbede815882cc989b0ca0a843df2f032 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# The number here should always be the line number the iOS build variable is on
line=$(sed "24q;d" ./app.config.js)
currentBuildNumber=$(echo "$line" | grep -oE '[0-9]+([.][0-9]+)?')
newBuildNumber=$((currentBuildNumber+1))
newBuildVariable="const IOS_BUILD_NUMBER = '$newBuildNumber'"
sed -i.bak "24s/.*/  $newBuildVariable/" ./app.config.js
rm -rf ./app.config.js.bak

echo "iOS build number bumped to $newBuildNumber"