-
Notifications
You must be signed in to change notification settings - Fork 46
/
build.py
executable file
·44 lines (35 loc) · 1.29 KB
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/python -B
import os
import platform
def packages_list():
return [
("com.unity.formats.fbx", os.path.join("build", "install", "com.unity.formats.fbx")),
]
def test_packages_list():
return [
"com.unity.formats.fbx",
]
def gitlab_ci_build_stage():
return "build"
def gitlab_ci_test_stage():
return "test"
def gitlab_ci_build_environment_fixup(build_env, logger):
import unity_editor_common
build_env["npm_config_registry"] = "https://staging-packages.unity.com"
if platform.system() == "Darwin" or platform.system() == "Linux":
# Assumption we need a mono, and we can grab it from here
build_env["PATH"] = unity_editor_common.get_mono_path() + ":" + build_env["PATH"]
elif platform.system() == "Windows":
# Make sure CMake is in the path
build_env["PATH"] = build_env["PATH"] + ";" + r'"C:\Program Files\CMake\bin"'
return build_env
def prepare_playmode_test_project(repo_path, project_path, logger):
import unity_package_build
if __name__ == "__main__":
import sys
sys.path.insert(0, os.path.abspath(os.path.join("..", "automation-tools")))
try:
import unity_package_build
build_log = unity_package_build.setup()
except ImportError:
print "No Automation Tools found."