From 57b9b1a094f1b049d40fcadc7fd1f92c1c5c9377 Mon Sep 17 00:00:00 2001 From: Zack Piispanen Date: Sat, 12 Oct 2013 03:01:07 -0400 Subject: [PATCH] Build with latest server bin? --- create_release.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/create_release.py b/create_release.py index 426260f7..dbb952a2 100644 --- a/create_release.py +++ b/create_release.py @@ -1,5 +1,7 @@ import os import shutil +import subprocess +import urllib32 import zipfile cur_wd = os.getcwd() @@ -79,9 +81,23 @@ def delete_files(): os.remove(http_bin_name) os.chdir(cur_wd) +def update_terraria_exe(): + url = urllib2.urlopen('http://direct.tshock.co:8085/browse/TERRA-TSAPI/latestSuccessful/artifact/JOB1/Server-Bin/TerrariaServer.exe') + localFile = open('TerrariaServer.exe', 'w') + localFile.write(url.read()) + localFile.close() + shutil.copy(terraria_bin_name, terraria_bin) + os.remove(terraria_bin_name) + +def build_software(): + subprocess.call(['/usr/local/bin/xbuild'], ['./TShockAPI/TShockAPI.csproj'], ['/p:Configuration=Release']) + subprocess.call(['/usr/local/bin/xbuild'], ['./TShockAPI/TShockAPI.csproj'], ['/p:Configuration=Debug']) + if __name__ == '__main__': create_release_folder() + update_terraria_exe() copy_dependencies() + build_software() package_release() package_debug() delete_files()