標籤:des style blog http color 使用 os io
第一次使用python請先看:http://my.oschina.net/LangZiAiFer/blog/298763
代碼管理我用的是Git;
工程clone如下:
def gitClone():
os.system (‘git clone https://[email protected]/xxx/goccia.git ~/desktop/20140804‘)
return
https://[email protected]/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()
謹以此做記錄,大神請繞。。。
未完待續、、、