Fix build

This commit is contained in:
Ali 2022-08-11 02:29:15 +04:00
parent f8cefa1683
commit a207846767
3 changed files with 12 additions and 7 deletions

View File

@ -55,7 +55,7 @@ experimental_i:
except:
- tags
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:
name: experimental
artifacts:

View File

@ -28,7 +28,7 @@ def resolve_executable(program):
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)
if executable_path is None:
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:
stderr_assignment = subprocess.STDOUT
if print_command:
print('Running {} {}'.format(executable_path, arguments))
process = subprocess.Popen(
[executable_path] + arguments,
stdout=subprocess.PIPE,

View File

@ -554,7 +554,7 @@ def build(bazel, arguments):
bazel_command_line.invoke_build()
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'):
os.remove(path)
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')
for dsym_path in dsym_paths:
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=[
'-9',
'-r',
artifacts_path + '/Telegram.DSYMs.zip',
artifacts_path + '/DSYMs'
'Telegram.DSYMs.zip',
'./DSYMs'
], check_result=True)
os.chdir(previous_directory)
shutil.rmtree(artifacts_path + '/DSYMs')