第一次使用python请先看:http://my.oschina.net/LangZiAiFer/blog/298763
代码管理我用的是Git;
工程clone如下:
def gitClone():
os.system (‘git clone https://JackMeng@bitbucket.org/xxx/goccia.git ~/desktop/20140804‘)
return
https://JackMeng@bitbucket.org/xxx/goccia.git是git服务器路径,不必care;
~/desktop/20140804是目标路径,放哪儿随你
checkout如下:
首先:进入工程存放路径:cd /Users/gbry/Desktop/20140804
def gitCheckout():
os.system (‘cd /Users/gbry/Desktop/20140804;git fetch && git checkout dev‘)
return
编译
def build_debug():
print "build debug start"
os.system (‘xcodebuild -version‘)
os.system (‘xcodebuild -showsdks‘)
os.system (‘xcodebuild -list‘)
os.system (‘cd /Users/gbry/Desktop/20140804;xcodebuild -sdk iphoneos7.1‘)
return
详见:http://www.cnblogs.com/xiaodao/archive/2012/03/01/2375609.html
打包ipa:
def build_ipa():
os.system (‘xcrun -sdk iphoneos PackageApplication -v /Users/gbry/Desktop/20140804/build/Release-iphoneos/Goccia.app -o /Users/gbry/Desktop/Goccia_%s.ipa‘%time.strftime(‘%Y-%m-%d‘,time.localtime(time.time())))
return
详见:http://www.devdiv.com/ios_-blog-1511-49991.html
然后依次调用以上函数:
gitClone()
gitCheckout()
build_debug()
build_ipa()
谨以此做记录,大神请绕。。。
未完待续、、、