Skip to content

Commit

Permalink
try fix extra folder being copied
Browse files Browse the repository at this point in the history
  • Loading branch information
drojf committed Mar 16, 2019
1 parent d5aaf84 commit 9e63939
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions travis_build_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@
import subprocess
import sys

use_shell = False
copyCommands = ['cp', '-r']
if sys.platform == "win32":
copyCommands = ['xcopy', '/E', '/I']
use_shell = True

IS_WINDOWS = sys.platform == "win32"

def call(args):
print("running: {}".format(args))
retcode = subprocess.call(args, shell=use_shell)
retcode = subprocess.call(args, shell=IS_WINDOWS) # use shell on windows
if retcode != 0:
exit(retcode)

Expand Down Expand Up @@ -82,15 +77,18 @@ def ignore_filter(folderPath, folderContents):
print("processing", osBootStrapPath)
# osBootStrapPath = os.path.join(bootStrapRoot, osFolderName)
osInstallData = os.path.join(osBootStrapPath, 'install_data')
call(copyCommands + [staging_folder, osInstallData])
if IS_WINDOWS:
call(['xcopy', '/E', '/I', staging_folder, osInstallData])
else:
call(['cp', '-r', staging_folder + '/.', osInstallData])

# RELATIVE PATHS MUST CONTAIN ./
tar_gz(f'./{bootstrap_copy_folder}/higu_linux64_installer/', os.path.join(output_folder, 'linux.tar.gz'))
zip(f'./{bootstrap_copy_folder}/higu_win_installer/', os.path.join(output_folder, 'windows.zip'))
zip(f'./{bootstrap_copy_folder}/higu_win_installer_32/', os.path.join(output_folder, 'windows32.zip'))
tar_gz(f'./{bootstrap_copy_folder}/higu_linux64_installer/', os.path.join(output_folder, 'seventh_mod_installer_linux.tar.gz'))
zip(f'./{bootstrap_copy_folder}/higu_win_installer/', os.path.join(output_folder, 'seventh_mod_installer_windows.zip'))
zip(f'./{bootstrap_copy_folder}/higu_win_installer_32/', os.path.join(output_folder, 'seventh_mod_installer_windows32.zip'))

# NOTE: mac zip doesn't need subdir - use '/*' to achieve this
zip(f'./{bootstrap_copy_folder}/higu_mac_installer/*', os.path.join(output_folder, 'mac.zip'))
zip(f'./{bootstrap_copy_folder}/higu_mac_installer/*', os.path.join(output_folder, 'seventh_mod_installer_mac.zip'))

try_remove_tree(staging_folder)
try_remove_tree(bootstrap_copy_folder)

0 comments on commit 9e63939

Please sign in to comment.