This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/example/doric/scripts/package-windows.py

39 lines
1.2 KiB
Python
Raw Normal View History

2021-05-12 16:20:24 +08:00
#!/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)
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;
2021-05-18 14:25:43 +08:00
system('conan export-pkg ./conanfile-windows-debug.py DoricCore/%s@bixin/stable -s arch=x86 -s build_type=Debug -s compiler.version=15 -s os=Windows' % version)
system('conan export-pkg ./conanfile-windows-release.py DoricCore/%s@bixin/stable -s arch=x86 -s build_type=Release -s compiler.version=15 -s os=Windows' % version)
2021-05-12 16:20:24 +08:00
if isOnline == "1":
system('conan upload DoricCore/%s@bixin/stable --all -r=pc' % version)
if __name__ == "__main__":
main()