-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.py
41 lines (40 loc) · 1.25 KB
/
package.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import sys
import time
import platform
import shutil
import glob
import requests
import json
import zipfile
def system(command):
retcode = os.system(command)
if retcode != 0:
raise Exception("Error while executing:\n\t %s" % command)
def main():
version = "0.0.0"
isOnline = "0"
paramlen = len(sys.argv)
print("paramlen:" + str(paramlen))
if paramlen == 3:
version = sys.argv[1]
isOnline = sys.argv[2]
print("version:"+str(version)+" isOnline:"+str(isOnline))
elif paramlen == 2:
version = sys.argv[1]
print("version:"+str(version))
elif paramlen == 1:
print("version:"+str(version)+" isOnline:"+str(isOnline))
else:
print("params error.");
return;
system('conan create . recordcapture/%s@bixin/stable -s compiler.version=15 -s arch=x86 -s build_type=Debug' % version)
system('conan create . recordcapture/%s@bixin/stable -s compiler.version=15 -s arch=x86 -s build_type=Release' % version)
if isOnline == "1":
system('conan upload recordcapture/%s@bixin/stable --all -r=pc' % version)
system('git tag %s' % version)
system('git push --tags')
if __name__ == "__main__":
main()