CH-J SM Mobilespráva serverů přes SSH
Menu
Vydané zdroje

CH-J SM Mobile

Procházejte adresáře a soubory konkrétního vydání aplikace.

Stáhnout zdroje ZIP
CH-J / SM Mobile 175 souborů
sm-mobile-20261016T185235Z-8e93ecc1b59a Přidáno: · Sestaveno:
build.py Přidáno: Datum není evidováno 1,7 KB · 25 řádků
Kód Stáhnout soubor
1#!/usr/bin/env python3
2"""Prepare a unique, locally consented build, then validate and package it."""
3import argparse,datetime,pathlib,secrets,subprocess,sys
4root=pathlib.Path(__file__).resolve().parents[1]
5p=argparse.ArgumentParser()
6p.add_argument('target',choices=['apk','aab','ios-simulator','ios','all','distribution'])
7p.add_argument('--release',action='store_true')
8args=p.parse_args()
9if (args.release or args.target == 'distribution') and args.target in ['apk','aab','all','distribution'] and not (root/'android/key.properties').exists():
10 raise SystemExit('Provide android/key.properties with your release signing identity first.')
11def run(*command): subprocess.run(command,cwd=root,check=True)
12run('flutter','pub','get')
13run(sys.executable,str(root/'tool/notices.py'))
14build_id='sm-mobile-'+datetime.datetime.now(datetime.timezone.utc).strftime('%Y%m%dT%H%M%SZ')+'-'+secrets.token_hex(6)
15import re
16version=re.search(r'^version:\s*([0-9]+\.[0-9]+\.[0-9]+)\+[0-9]+\s*$',(root/'pubspec.yaml').read_text(),re.M).group(1)
17(root/'lib/core/build_info.dart').write_text("// Generated by tool/build.py. Never reuse for a different distributed build.\nconst appVersion = '"+version+"';\nconst buildId = '"+build_id+"';\n")
18run('flutter','analyze')
19run('flutter','test')
20mode='--release' if args.release or args.target == 'distribution' else '--debug'
21if args.target in ['apk','all','distribution']: run('flutter','build','apk',mode)
22if args.target in ['aab','all','distribution']: run('flutter','build','appbundle',mode)
23if args.target in ['ios-simulator','all']: run('flutter','build','ios','--simulator')
24if args.target in ['ios','distribution']: run('flutter','build','ios','--release','--no-codesign')
25print('Built '+build_id)
SHA-256f84053116cb57a03112e383bb53e74fc94b82b11571978fd517db4842362abd3

CH-J Proprietary Software License 1.14 · Zdroje jsou zveřejněny pod CH-J Proprietary Software License 1.14. Jejich dostupnost nemění licenční podmínky ani neposkytuje další oprávnění.

SHA-256 archivu46e427a43e87af091004f36145590bda8fe90086dfb0f631afeb5029fb0b5655
Soubory