def package_files(generated_json_dir, docs_build_dir, static_json_dir, tag='master'):
 package_path = os.path.join(docs_build_dir, 'json_build')
 shutil.rmtree(package_path, ignore_errors=True)
 shutil.copytree(static_json_dir, package_path)
 shutil.copytree(os.path.join(generated_json_dir, 'google', 'cloud'), os.path.join(package_path, 'json', tag, 'google', 'cloud'))
 shutil.copyfile(os.path.join(generated_json_dir, 'types.json'), os.path.join(package_path, 'json', tag, 'types.json'))

def package_files ( generated_json_dir , docs_build_dir , static_json_dir , tag = 'master' ) : package_path = os . path . join ( docs_build_dir , 'json_build' ) shutil . rmtree ( package_path , ignore_errors = True ) shutil . copytree ( static_json_dir , package_path ) shutil . copytree ( os . path . join ( generated_json_dir , 'google' , 'cloud' ) , os . path . join ( package_path , 'json' , tag , 'google' , 'cloud' ) ) shutil . copyfile ( os . path . join ( generated_json_dir , 'types.json' ) , os . path . join ( package_path , 'json' , tag , 'types.json' ) )
copy app and json files into a convenient place to deploy from .