|
|
|
@ -164,6 +164,7 @@ def get_the_last_windowsApp_GITversion(name): |
|
|
|
print('正在git获取上一个版本的代码:') |
|
|
|
os.system('mkdir -p /tmp/theLastCode/') |
|
|
|
os.system('git clone ' + os.getenv('DRONE_GIT_HTTP_URL') + ' /tmp/theLastCode/IOTContainer/' ) |
|
|
|
os.system('ls && pwd' ) |
|
|
|
os.system('cd /tmp/theLastCode/ && git checkout ' + the_last_windowsAppZIP_GITversion) |
|
|
|
return the_last_windowsAppZIP_GITversion |
|
|
|
else: |
|
|
|
@ -197,7 +198,7 @@ def count_files_in_directory(directory): |
|
|
|
def build_the_current_windowsApp(name): |
|
|
|
the_last_windowsApp_GITversion = get_the_last_windowsApp_GITversion(name) |
|
|
|
|
|
|
|
the_current_windowsAppZIP="/drone/src/IOTContainer/" + os.getenv('DRONE_REPO_NAME') + '.' + os.getenv('version') + '.zip' |
|
|
|
the_current_windowsAppZIP="/drone/src/" + os.getenv('DRONE_REPO_NAME') + '.' + os.getenv('version') + '.zip' |
|
|
|
|
|
|
|
# the_last_windowsAppZIP = get_the_last_windowsAppZIP(name) |
|
|
|
|
|
|
|
@ -212,7 +213,6 @@ def build_the_current_windowsApp(name): |
|
|
|
print("初次上传,不比对zip,直接打包上传") |
|
|
|
platformAppAdd(the_current_windowsAppZIP, '.zip') |
|
|
|
|
|
|
|
os.system('rm -rf ' + the_current_windowsAppZIP) |
|
|
|
build_for_windowsApp() |
|
|
|
platformAppAdd('/drone/src/Sources/Setup.exe', '.exe') |
|
|
|
else: |
|
|
|
@ -227,7 +227,6 @@ def build_the_current_windowsApp(name): |
|
|
|
os.system('cd /tmp/IOTContainer/ && zip -rq ' + os.getenv('DRONE_REPO_NAME') + '.' + os.getenv('version') + '.zip ./') |
|
|
|
diff_zip='/tmp/IOTContainer/' + os.getenv('DRONE_REPO_NAME') + '.' + os.getenv('version') + '.zip' |
|
|
|
platformAppAdd(diff_zip, '.zip') |
|
|
|
os.system('rm -rf ' + the_current_windowsAppZIP) |
|
|
|
build_for_windowsApp() |
|
|
|
platformAppAdd('/drone/src/Sources/Setup.exe', '.exe') |
|
|
|
|
|
|
|
|