def update_repo( path, revision ): if revision > 0: if path == pr_build.core_path: pr_build.copy( os.path.join( repo_path, 'core_patch%s' % revision ), path ) if path == pr_build.levels_path: pr_build.copy( os.path.join( repo_path, 'levels_patch%s' % revision ), path )
def export_repo( path, destination ): pr_build.copy( path, destination )
pr_utils.delay = delay if __name__ == "__main__": if 'v1' in sys.argv: pr_build.options['zip'] = 'v1' pr_build.root_path = os.path.dirname(__file__) repo_path = os.path.join( pr_build.root_path, 'test_repos' ) pr_build.delete( repo_path ) if not os.path.exists( repo_path ): os.makedirs( repo_path ) pr_build.copy( os.path.join( pr_build.root_path, 'test', pr_build.options['zip'] ), os.path.abspath( repo_path ) ) pr_build.builds_path = os.path.join( pr_build.root_path, 'test_builds' ) if '-k' not in sys.argv and '--skip' not in sys.argv: pr_build.delete( pr_build.builds_path ) if not os.path.exists( pr_build.builds_path ): os.makedirs( pr_build.builds_path ) pr_build.core_path = os.path.join( repo_path, 'core' ) pr_build.levels_path = os.path.join( repo_path, 'levels' ) pr_build.installer_path = os.path.join( repo_path, 'installer' ) pr_build.core_build = os.path.join( pr_build.builds_path, 'core' ) pr_build.levels_build = os.path.join( pr_build.builds_path, 'levels' )