def main(argc, argv): if argc != 3: print 'usage:python send.py <product_shortname (bdm|bdkv)> <build_type (daily|force)>' return debugPath = '' binPath = '' logPath = '' setupPath = '' svrDirName = '' if argv[1].lower() == 'bdm': if argv[2].lower() == 'daily': svrDirName = comm.getInstallerVersion('bdm') elif argv[2].lower() == 'version': svrDirName = comm.getInstallerVersion('bdm') elif argv[2].lower() == 'partial': svrDirName = comm.getInstallerVersion('bdm') debugPath = conf.debug_path binPath = conf.bin_path logPath = conf.log_path setupPath = conf.setup_path elif argv[1].lower() == 'bdkv': if argv[2].lower() == 'daily': svrDirName = comm.getInstallerVersion('bdkv') elif argv[2].lower() == 'version': svrDirName = comm.getInstallerVersion('bdm') elif argv[2].lower() == 'partial': svrDirName = comm.getInstallerVersion('bdm') debugPath = conf.kvdebug_path binPath = conf.kvbin_path logPath = conf.kvlog_path setupPath = conf.kvsetup_path if not (debugPath and binPath and logPath and setupPath): print 'configuration error,please check conf.py' return #use custom ftppath ftpPathDirName = comm.getArchiveFullPath(argv[1].lower()) if not os.path.exists(ftpPathDirName): os.mkdir(ftpPathDirName) if not os.path.exists(ftpPathDirName + conf.ftpPathNameD): os.mkdir(ftpPathDirName + conf.ftpPathNameD) if not os.path.exists(ftpPathDirName + conf.ftpPathNameRR): os.mkdir(ftpPathDirName + conf.ftpPathNameRR) if not os.path.exists(ftpPathDirName + conf.ftpPathNameLog): os.mkdir(ftpPathDirName + conf.ftpPathNameLog) #autochange name of installer_md5.log md5LogName = 'installer_md5_%s.txt' % time.ctime().replace( ':', '-').replace(' ', '_') command = 'rename ' + conf.verify_md5_file + ' ' + md5LogName os.system(command) copyFiles(setupPath, conf.setupList, ftpPathDirName) copyFiles(conf.verify_path, conf.logList, ftpPathDirName) copyFiles(debugPath, conf.binList, ftpPathDirName + conf.ftpPathNameD) copyFiles(binPath, conf.binList, ftpPathDirName + conf.ftpPathNameRR) copyFiles(logPath, conf.logList, ftpPathDirName + conf.ftpPathNameLog)
def main(argc, argv): if argc != 3: print 'usage:python send.py <product_shortname (bdm|bdkv)> <build_type (daily|force)>' return debugPath = '' binPath = '' logPath = '' setupPath = '' svrDirName = '' if argv[1].lower() == 'bdm': if argv[2].lower() == 'daily': svrDirName = comm.getInstallerVersion('bdm') elif argv[2].lower() == 'version': svrDirName = comm.getInstallerVersion('bdm') elif argv[2].lower() == 'partial': svrDirName = comm.getInstallerVersion('bdm') debugPath = conf.debug_path binPath = conf.bin_path logPath = conf.log_path setupPath = conf.setup_path elif argv[1].lower() == 'bdkv': if argv[2].lower() == 'daily': svrDirName = comm.getInstallerVersion('bdkv') elif argv[2].lower() == 'version': svrDirName = comm.getInstallerVersion('bdm') elif argv[2].lower() == 'partial': svrDirName = comm.getInstallerVersion('bdm') debugPath = conf.kvdebug_path binPath = conf.kvbin_path logPath = conf.kvlog_path setupPath = conf.kvsetup_path if not (debugPath and binPath and logPath and setupPath): print 'configuration error,please check conf.py' return #use custom ftppath ftpPathDirName = comm.getArchiveFullPath(argv[1].lower()) if not os.path.exists(ftpPathDirName): os.mkdir(ftpPathDirName) if not os.path.exists(ftpPathDirName+conf.ftpPathNameD): os.mkdir(ftpPathDirName+conf.ftpPathNameD) if not os.path.exists(ftpPathDirName+conf.ftpPathNameRR): os.mkdir(ftpPathDirName+conf.ftpPathNameRR) if not os.path.exists(ftpPathDirName+conf.ftpPathNameLog): os.mkdir(ftpPathDirName+conf.ftpPathNameLog) #autochange name of installer_md5.log md5LogName = 'installer_md5_%s.txt' % time.ctime().replace(':','-').replace(' ','_') command = 'rename ' + conf.verify_md5_file + ' ' + md5LogName os.system(command) copyFiles(setupPath,conf.setupList,ftpPathDirName) copyFiles(conf.verify_path,conf.logList,ftpPathDirName) copyFiles(debugPath,conf.binList,ftpPathDirName+conf.ftpPathNameD) copyFiles(binPath,conf.binList,ftpPathDirName+conf.ftpPathNameRR) copyFiles(logPath,conf.logList,ftpPathDirName+conf.ftpPathNameLog)
def main(argc, argv): if argc != 3 and argc != 4: print 'usage:python rewrite_version.py <product_shortname (bdm|bdkv)> <build_type (daily|force)> [update]' return buildIdFile = '' nsiFile = '' nsiBuildlineFile = '' productMacro = '' bUpdate = False if argc == 4 and argv[3] == 'update': bUpdate = True if argv[1].lower() == 'bdm': nsiBuildlineFile = conf.bdm_nsifile_buildline if argv[2].lower() == 'daily': buildIdFile = conf.buildIdFile nsiFile = conf.bdm_nsifile_daily elif argv[2].lower() == 'version': buildIdFile = conf.versionBuildIdFile nsiFile = conf.bdm_nsifile_version elif argv[2].lower() == 'partial': buildIdFile = conf.customBuildIdFile nsiFile = conf.bdm_nsifile_partial elif argv[1].lower() == 'bdkv': nsiBuildlineFile = conf.bdkv_nsifile_buildline if argv[2].lower() == 'daily': buildIdFile = conf.kvBuildIdFile nsiFile = conf.bdkv_nsifile_daily elif argv[2].lower() == 'version': buildIdFile = conf.kvVersionBuildIdFile nsiFile = conf.bdkv_nsifile_version elif argv[2].lower() == 'partial': buildIdFile = conf.kvCustomBuildIdFile nsiFile = conf.bdkv_nsifile_partial if buildIdFile and nsiFile: num = AddBuildId(buildIdFile) num = comm.setBuildNumber(argv[1].lower(), num, True, bUpdate) severtime = time.strftime("%Y-%m-%d %I:%M:%S") update_nsis_build_info(nsiFile, '!define RELEASE_VERSION', '!define BUILD_TIME', num, severtime) update_buildver(num) verStr = comm.getInstallerVersion(argv[1].lower()).split('.') update_version_define(nsiFile, verStr) update_product_version(nsiFile, verStr) buildlinestr = '!define BUILD_LINE "%s"' % verStr[2] comm.saveFile(nsiBuildlineFile, buildlinestr)
def main(argc,argv): if argc != 3 and argc != 4: print 'usage:python rewrite_version.py <product_shortname (bdm|bdkv)> <build_type (daily|force)> [update]' return buildIdFile = '' nsiFile = '' nsiBuildlineFile = '' productMacro = '' bUpdate = False if argc == 4 and argv[3] == 'update': bUpdate = True if argv[1].lower() == 'bdm': nsiBuildlineFile = conf.bdm_nsifile_buildline if argv[2].lower() == 'daily': buildIdFile = conf.buildIdFile nsiFile = conf.bdm_nsifile_daily elif argv[2].lower() == 'version': buildIdFile = conf.versionBuildIdFile nsiFile = conf.bdm_nsifile_version elif argv[2].lower() == 'partial': buildIdFile = conf.customBuildIdFile nsiFile = conf.bdm_nsifile_partial elif argv[1].lower() == 'bdkv': nsiBuildlineFile = conf.bdkv_nsifile_buildline if argv[2].lower() == 'daily': buildIdFile = conf.kvBuildIdFile nsiFile = conf.bdkv_nsifile_daily elif argv[2].lower() == 'version': buildIdFile = conf.kvVersionBuildIdFile nsiFile = conf.bdkv_nsifile_version elif argv[2].lower() == 'partial': buildIdFile = conf.kvCustomBuildIdFile nsiFile = conf.bdkv_nsifile_partial if buildIdFile and nsiFile: num = AddBuildId(buildIdFile) num = comm.setBuildNumber(argv[1].lower(),num,True,bUpdate) severtime = time.strftime("%Y-%m-%d %I:%M:%S") update_nsis_build_info(nsiFile, '!define RELEASE_VERSION', '!define BUILD_TIME',num,severtime) update_buildver(num) verStr = comm.getInstallerVersion(argv[1].lower()).split('.') update_version_define(nsiFile,verStr) update_product_version(nsiFile,verStr) buildlinestr = '!define BUILD_LINE "%s"' % verStr[2] comm.saveFile(nsiBuildlineFile,buildlinestr)