mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix build
This commit is contained in:
parent
f8cefa1683
commit
a207846767
@ -55,7 +55,7 @@ experimental_i:
|
|||||||
except:
|
except:
|
||||||
- tags
|
- tags
|
||||||
script:
|
script:
|
||||||
- PYTHONPATH="$PYTHONPATH:/darwin-containers" python3 build-system/Make/Make.py remote-build --darwinContainersHost="http://host.docker.internal:8650" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath=build-system/appstore-configuration.json --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=appstore --configuration=release_arm64
|
- PYTHONPATH="$PYTHONPATH:/darwin-containers" python3 -u build-system/Make/Make.py remote-build --darwinContainersHost="http://host.docker.internal:8650" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath=build-system/appstore-configuration.json --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=appstore --configuration=release_arm64
|
||||||
environment:
|
environment:
|
||||||
name: experimental
|
name: experimental
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -28,7 +28,7 @@ def resolve_executable(program):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def run_executable_with_output(path, arguments, decode=True, input=None, stderr_to_stdout=True, check_result=False):
|
def run_executable_with_output(path, arguments, decode=True, input=None, stderr_to_stdout=True, print_command=False, check_result=False):
|
||||||
executable_path = resolve_executable(path)
|
executable_path = resolve_executable(path)
|
||||||
if executable_path is None:
|
if executable_path is None:
|
||||||
raise Exception('Could not resolve {} to a valid executable file'.format(path))
|
raise Exception('Could not resolve {} to a valid executable file'.format(path))
|
||||||
@ -37,6 +37,9 @@ def run_executable_with_output(path, arguments, decode=True, input=None, stderr_
|
|||||||
if stderr_to_stdout:
|
if stderr_to_stdout:
|
||||||
stderr_assignment = subprocess.STDOUT
|
stderr_assignment = subprocess.STDOUT
|
||||||
|
|
||||||
|
if print_command:
|
||||||
|
print('Running {} {}'.format(executable_path, arguments))
|
||||||
|
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
[executable_path] + arguments,
|
[executable_path] + arguments,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
|
@ -554,7 +554,7 @@ def build(bazel, arguments):
|
|||||||
bazel_command_line.invoke_build()
|
bazel_command_line.invoke_build()
|
||||||
|
|
||||||
if arguments.outputBuildArtifactsPath is not None:
|
if arguments.outputBuildArtifactsPath is not None:
|
||||||
artifacts_path = arguments.outputBuildArtifactsPath
|
artifacts_path = os.path.abspath(arguments.outputBuildArtifactsPath)
|
||||||
if os.path.exists(artifacts_path + '/Telegram.ipa'):
|
if os.path.exists(artifacts_path + '/Telegram.ipa'):
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
if os.path.exists(artifacts_path + '/DSYMs'):
|
if os.path.exists(artifacts_path + '/DSYMs'):
|
||||||
@ -574,13 +574,15 @@ def build(bazel, arguments):
|
|||||||
dsym_paths = glob.glob('bazel-out/applebin_ios-ios_arm*-opt-ST-*/bin/Telegram/*.dSYM')
|
dsym_paths = glob.glob('bazel-out/applebin_ios-ios_arm*-opt-ST-*/bin/Telegram/*.dSYM')
|
||||||
for dsym_path in dsym_paths:
|
for dsym_path in dsym_paths:
|
||||||
file_name = os.path.basename(dsym_path)
|
file_name = os.path.basename(dsym_path)
|
||||||
shutil.copyfile(ipa_paths[0], artifacts_path + '/DSYMs/{}'.format(file_name))
|
shutil.copytree(dsym_path, artifacts_path + '/DSYMs/{}'.format(file_name))
|
||||||
|
previous_directory = os.getcwd()
|
||||||
|
os.chdir(artifacts_path)
|
||||||
run_executable_with_output('zip', arguments=[
|
run_executable_with_output('zip', arguments=[
|
||||||
'-9',
|
|
||||||
'-r',
|
'-r',
|
||||||
artifacts_path + '/Telegram.DSYMs.zip',
|
'Telegram.DSYMs.zip',
|
||||||
artifacts_path + '/DSYMs'
|
'./DSYMs'
|
||||||
], check_result=True)
|
], check_result=True)
|
||||||
|
os.chdir(previous_directory)
|
||||||
shutil.rmtree(artifacts_path + '/DSYMs')
|
shutil.rmtree(artifacts_path + '/DSYMs')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user