Changeset d48afa1 in nscp for build


Ignore:
Timestamp:
11/13/11 22:45:56 (19 months ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2
Children:
16198e3
Parents:
b24c97f
Message:

Updated the post-build scripts a bit to allow automatic upload after build

Location:
build/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • build/python/config.py

    r04ef932 rd48afa1  
    11 
    22BREAKPAD_FOUND = "${BREAKPAD_FOUND}" 
    3 BREAKPAD_FOUND = "FALSE" 
    43BREAKPAD_DUMPSYMS_EXE = "${BREAKPAD_DUMPSYMS_EXE}" 
    54BUILD_TARGET_EXE_PATH = "${BUILD_TARGET_EXE_PATH}" 
     
    109VERSION_TXT = "${VERSION_TXT}" 
    1110VERSION_ARCH = "${VERSION_ARCH}" 
     11TARGET_SITE = "${TARGET_SITE}" 
     12SCP_BINARY = 'c:\Progra~2\PuTTY\pscp.exe' # ${PSCP_EXE} 
    1213 
     14if CMAKE_CL_64 != "0": # Due to bug in x64 dump_symbols (or possible windows API) 
     15  BREAKPAD_FOUND = "FALSE" 
  • build/python/postbuild.py

    r04ef932 rd48afa1  
    1616vstring = version.version() 
    1717 
     18def scp_file(file): 
     19  tfile = os.path.basename(file) 
     20  (name, version, arch) = tfile.split('-') 
     21  target = None 
     22  if '_' in name: 
     23    (name, tag) = name.split('_') 
     24    if globals().has_key('TARGET_SITE_%s'%tag): 
     25      target = globals().get('TARGET_SITE_%s'%tag) 
     26      print 'Found tagged installer %s for %s'%(tfile, tag) 
     27    else: 
     28      print 'Ignoring unconfigured tagged installer: %s (define TARGET_SITE_%s to a destination)'%(tag,tag) 
     29  else: 
     30    print 'Found normal installer %s'%tfile 
     31    target = TARGET_SITE 
     32  if target: 
     33    print 'Uploading name: %s to %s'%(tfile, target) 
     34    os.system("%s %s %s"%(SCP_BINARY, file, target)) 
     35 
    1836def rename_and_move(file, target): 
    1937  tfile = '%s/%s'%(target, os.path.basename(file)) 
     
    3048  return matches 
    3149   
    32 target_name = 'NSCP-%s-%s-symbols.zip'%(VERSION, VERSION_ARCH) 
     50target_name = 'NSCP-%s-%s_symbols.zip'%(vstring, VERSION_ARCH) 
    3351 
    34 if BREAKPAD_FOUND == "TRUEee": 
     52if BREAKPAD_FOUND == "TRUE": 
    3553  print "Gathering symbols into %s"%target_name 
    3654  matches = find_by_pattern(BUILD_TARGET_EXE_PATH, '*.pdb') 
    37   zip = zipfile.ZipFile(target_name, "w") 
     55  zip = zipfile.ZipFile(target_name, 'w', zipfile.ZIP_DEFLATED) 
    3856  for f in matches: 
    3957    print "Processing: %s"%f 
     
    6280  for f in find_by_pattern(BUILD_TARGET_EXE_PATH, '*%s*.zip'%vstring): 
    6381    rename_and_move(f, target_archives) 
    64    
    6582 
     83try: 
     84  if TARGET_SITE != '' and SCP_BINARY != '': 
     85    print "Distributing files to site..." 
     86 
     87    for f in find_by_pattern(BUILD_TARGET_EXE_PATH, '*%s*.msi'%vstring): 
     88      scp_file(f) 
     89    for f in find_by_pattern(BUILD_TARGET_EXE_PATH, '*%s*.zip'%vstring): 
     90      scp_file(f) 
     91except NameError: 
     92  print 'TARGET_SITE not defined so we wont upload anything...' 
Note: See TracChangeset for help on using the changeset viewer.