浏览代码

Cleanup local build.py to utilize central scripts

Centralize the copying actions so we can better deal with the build edge cases in one spot.
/main
Alex Lian 7 年前
当前提交
6a2d4b34
共有 1 个文件被更改,包括 4 次插入19 次删除
  1. 23
      build.py

23
build.py


#!/usr/bin/python -B
import os
import json
import shutil
import textwrap
sub_packages = {}
sub_package_folders = {}
publish_order = []
def packages_list():
return [

# helper function for preparations of tests
def copy_path_to_project(path, repo_path, project_path, logger):
logger.info("Copying {}".format(path))
shutil.copytree(os.path.join(repo_path, path), os.path.join(project_path, "Assets", os.path.basename(path)))
def copy_file_to_project(path, repo_path, project_path, logger):
logger.info("Copying {}".format(path))
shutil.copy(os.path.join(repo_path, path), os.path.join(project_path, "Assets", path))
copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "NewNodes"), repo_path, project_path, logger)
copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "TestAssets"), repo_path, project_path, logger)
copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "UnityShaderEditor", "Editor", "Testing"), repo_path, project_path, logger)
import unity_package_build
unity_package_build.copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "NewNodes"), repo_path, project_path, logger)
unity_package_build.copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "TestAssets"), repo_path, project_path, logger)
unity_package_build.copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "UnityShaderEditor", "Editor", "Testing"), repo_path, project_path, logger)
if __name__ == "__main__":
import sys

正在加载...
取消
保存