mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Add firebase app distribution
This commit is contained in:
parent
2393424bde
commit
61f247235a
@ -22,6 +22,7 @@ internal:
|
||||
- export PATH=/opt/homebrew/opt/ruby/bin:$PATH
|
||||
- export PATH=`gem environment gemdir`/bin:$PATH
|
||||
- python3 -u build-system/Make/Make.py remote-build --darwinContainers="$DARWIN_CONTAINERS" --darwinContainersHost="$DARWIN_CONTAINERS_HOST" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath="build-system/appcenter-configuration.json" --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=adhoc --configuration=release_arm64
|
||||
- python3 -u build-system/Make/DeployToFirebase.py --configuration="$TELEGRAM_PRIVATE_DATA_PATH/firebase-configurations/firebase-internal.json" --ipa="build/artifacts/Telegram.ipa" --dsyms="build/artifacts/Telegram.DSYMs.zip"
|
||||
- python3 -u build-system/Make/DeployToAppCenter.py --configuration="$TELEGRAM_PRIVATE_DATA_PATH/appcenter-configurations/appcenter-internal.json" --ipa="build/artifacts/Telegram.ipa" --dsyms="build/artifacts/Telegram.DSYMs.zip"
|
||||
environment:
|
||||
name: internal
|
||||
|
72
build-system/Make/DeployToAppFirebase.py
Normal file
72
build-system/Make/DeployToAppFirebase.py
Normal file
@ -0,0 +1,72 @@
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
import json
|
||||
|
||||
from BuildEnvironment import check_run_system
|
||||
|
||||
def deploy_to_firebase(args):
|
||||
if not os.path.exists(args.configuration):
|
||||
print('{} does not exist'.format(args.configuration))
|
||||
sys.exit(1)
|
||||
if not os.path.exists(args.ipa):
|
||||
print('{} does not exist'.format(args.ipa))
|
||||
sys.exit(1)
|
||||
if args.dsyms is not None and not os.path.exists(args.dsyms):
|
||||
print('{} does not exist'.format(args.dsyms))
|
||||
sys.exit(1)
|
||||
|
||||
with open(args.configuration) as file:
|
||||
configuration_dict = json.load(file)
|
||||
required_keys = [
|
||||
'app_id',
|
||||
'group',
|
||||
]
|
||||
for key in required_keys:
|
||||
if key not in configuration_dict:
|
||||
print('Configuration at {} does not contain {}'.format(args.configuration, key))
|
||||
sys.exit(1)
|
||||
|
||||
debug_flag = "--debug" if args.debug else ""
|
||||
command = 'firebase appdistribution:distribute --app {app_id} --groups "{group}" {debug_flag}'.format(
|
||||
app_id=configuration_dict['app_id'],
|
||||
group=configuration_dict['group'],
|
||||
debug_flag=debug_flag
|
||||
)
|
||||
|
||||
command += ' "{ipa_path}"'.format(ipa_path=args.ipa)
|
||||
|
||||
check_run_system(command)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(prog='deploy-firebase')
|
||||
|
||||
parser.add_argument(
|
||||
'--configuration',
|
||||
required=True,
|
||||
help='Path to configuration json.'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--ipa',
|
||||
required=True,
|
||||
help='Path to IPA.'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--dsyms',
|
||||
required=False,
|
||||
help='Path to DSYMs.zip.'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--debug',
|
||||
action='store_true',
|
||||
help='Enable debug output for firebase deploy.'
|
||||
)
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
parser.print_help()
|
||||
sys.exit(1)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
deploy_to_firebase(args)
|
Loading…
x
Reference in New Issue
Block a user