Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.py
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | if not script_path.is_file() or not os.access(script_path, os.X_OK): | ||||
"The script file {} does not exist or does not have execution permission".format( | "The script file {} does not exist or does not have execution permission".format( | ||||
str(script_path) | str(script_path) | ||||
) | ) | ||||
) | ) | ||||
git_root = PurePath(get_git_root()) | git_root = PurePath(get_git_root()) | ||||
# Create the build directory as needed | # Create the build directory as needed | ||||
build_directory = Path(git_root.joinpath(args.build)) | build_directory = Path(git_root.joinpath('build', args.build)) | ||||
build_directory.mkdir(exist_ok=True) | build_directory.mkdir(exist_ok=True, parents=True) | ||||
# We will provide the required environment variables | # We will provide the required environment variables | ||||
environment_variables = { | environment_variables = { | ||||
"BUILD_DIR": str(build_directory), | "BUILD_DIR": str(build_directory), | ||||
"CMAKE_PLATFORMS_DIR": git_root.joinpath("cmake", "platforms"), | "CMAKE_PLATFORMS_DIR": git_root.joinpath("cmake", "platforms"), | ||||
"THREADS": str(os.cpu_count() or 1), | "THREADS": str(os.cpu_count() or 1), | ||||
"TOPLEVEL": str(git_root), | "TOPLEVEL": str(git_root), | ||||
} | } | ||||
Show All 15 Lines |