2012-09-25 66 views
0

僅當用戶名是XXX時,如何在Xcode中自動增加版本?僅當用戶名是XXX時,如何在Xcode中自動增加版本版本?

我想:

#!/bin/bash 
    if [$USER == "XXX"];then 
    buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") 
    buildNumber=$(($buildNumber + 1)) 
    /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" 
    fi 

但沒有成功..任何想法?

回答

0

我發現它:

#!/bin/bash 
if [ $ALTERNATE_OWNER == "XXX" ]; then 
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") 
buildNumber=$(($buildNumber + 1)) 
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" 
fi 
相關問題