mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-26 17:25:13 +03:00
version ios
This commit is contained in:
parent
dcb84a59b3
commit
2503830b47
17
version-ios.sh
Normal file
17
version-ios.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash -e
|
||||
|
||||
PROJECT_DIR="ios/eSteem"
|
||||
INFOPLIST_FILE="Info.plist"
|
||||
INFOPLIST_DIR="${PROJECT_DIR}/${INFOPLIST_FILE}"
|
||||
|
||||
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
||||
|
||||
BUILD_NUMBER=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_DIR}")
|
||||
BUILD_NUMBER=$(($BUILD_NUMBER + 1))
|
||||
|
||||
|
||||
# Update plist with new values
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${PACKAGE_VERSION#*v}" "${INFOPLIST_DIR}"
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD_NUMBER" "${INFOPLIST_DIR}"
|
||||
|
||||
git add "${INFOPLIST_DIR}"
|
Loading…
Reference in New Issue
Block a user