CH-J SM Mobilequản lý máy chủ qua SSH
Menu
Mã nguồn đã công bố

CH-J SM Mobile

Duyệt thư mục và tệp của một bản phát hành ứng dụng cụ thể.

Tải mã nguồn dạng ZIP
CH-J / SM Mobile 175 tệp
sm-mobile-20261016T185235Z-8e93ecc1b59a Ngày thêm: · Ngày dựng:
build.py Ngày thêm: Chưa ghi nhận ngày 1.7 KB · 25 dòng
Mã Tải tệp xuống
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 · Mã nguồn được cung cấp theo CH-J Proprietary Software License 1.14. Việc công khai mã nguồn không thay đổi các điều khoản giấy phép và không cấp thêm quyền nào.

SHA-256 của tệp nén46e427a43e87af091004f36145590bda8fe90086dfb0f631afeb5029fb0b5655
Tệp