예제 #1
0
def generate_project(arguments):
    bazel_command_line = BazelCommandLine(
        bazel_path=arguments.bazel,
        override_bazel_version=arguments.overrideBazelVersion,
        override_xcode_version=arguments.overrideXcodeVersion,
        bazel_user_root=arguments.bazelUserRoot)

    if arguments.cacheDir is not None:
        bazel_command_line.add_cache_dir(arguments.cacheDir)
    elif arguments.cacheHost is not None:
        bazel_command_line.add_remote_cache(arguments.cacheHost)

    resolve_configuration(bazel_command_line, arguments)

    bazel_command_line.set_build_number(arguments.buildNumber)

    disable_extensions = False
    if arguments.disableExtensions is not None:
        disable_extensions = arguments.disableExtensions
    if arguments.disableProvisioningProfiles is not None:
        disable_provisioning_profiles = arguments.disableProvisioningProfiles

    call_executable(['killall', 'Xcode'], check_result=False)

    generate(build_environment=bazel_command_line.build_environment,
             disable_extensions=disable_extensions,
             disable_provisioning_profiles=disable_provisioning_profiles,
             configuration_path=bazel_command_line.configuration_path,
             bazel_app_arguments=bazel_command_line.
             get_project_generation_arguments())
예제 #2
0
def generate_project(bazel, arguments):
    bazel_command_line = BazelCommandLine(
        bazel=bazel,
        override_bazel_version=arguments.overrideBazelVersion,
        override_xcode_version=arguments.overrideXcodeVersion,
        bazel_user_root=arguments.bazelUserRoot)

    if arguments.cacheDir is not None:
        bazel_command_line.add_cache_dir(arguments.cacheDir)
    elif arguments.cacheHost is not None:
        bazel_command_line.add_remote_cache(arguments.cacheHost)

    bazel_command_line.set_continue_on_error(arguments.continueOnError)

    resolve_configuration(bazel_command_line, arguments)

    bazel_command_line.set_build_number(arguments.buildNumber)

    disable_extensions = False
    disable_provisioning_profiles = False
    generate_dsym = False
    target_name = "Telegram"

    if arguments.disableExtensions is not None:
        disable_extensions = arguments.disableExtensions
    if arguments.disableProvisioningProfiles is not None:
        disable_provisioning_profiles = arguments.disableProvisioningProfiles
    if arguments.generateDsym is not None:
        generate_dsym = arguments.generateDsym
    if arguments.target is not None:
        target_name = arguments.target

    call_executable(['killall', 'Xcode'], check_result=False)

    generate(build_environment=bazel_command_line.build_environment,
             disable_extensions=disable_extensions,
             disable_provisioning_profiles=disable_provisioning_profiles,
             generate_dsym=generate_dsym,
             configuration_path=bazel_command_line.configuration_path,
             bazel_app_arguments=bazel_command_line.
             get_project_generation_arguments(),
             target_name=target_name)