refactor(build): 统一本地与 CI 构建入口及平台发布工具 (#9)
Gitea CI / Check code and tests (push) Successful in 7m38s
Gitea CI / Build Android APK (push) Successful in 6m20s
Gitea CI / Audit and package Windows x64 (push) Canceled after 0s
Gitea CI / Assemble and validate CI artifacts (push) Canceled after 0s
Gitea CI / Gitea CI passed (push) Canceled after 0s
Gitea CI / Build Windows x64 app (push) Canceled after 14m42s
Gitea CI / Check code and tests (push) Successful in 7m38s
Gitea CI / Build Android APK (push) Successful in 6m20s
Gitea CI / Audit and package Windows x64 (push) Canceled after 0s
Gitea CI / Assemble and validate CI artifacts (push) Canceled after 0s
Gitea CI / Gitea CI passed (push) Canceled after 0s
Gitea CI / Build Windows x64 app (push) Canceled after 14m42s
This commit was merged in pull request #9.
This commit is contained in:
1 parent
a13a54d5ec
commit
4a759d81a6
61 files changed
+1913
-388
No files matched your search
@@ -0,0 +1,27 @@
|
||||
"""Build the application with shared development/production presets."""
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from common.build import build_application
|
||||
from common.process import cli
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('platform', choices=['android', 'windows', 'macos'])
|
||||
parser.add_argument('--flavor', choices=['development', 'production'], default='production')
|
||||
parser.add_argument('--mode', choices=['debug', 'profile', 'release'], default='release')
|
||||
parser.add_argument('--split-per-abi', action='store_true')
|
||||
# Explicit separator keeps custom Flutter arguments distinct from presets.
|
||||
arguments = sys.argv[1:]
|
||||
separator = arguments.index('--') if '--' in arguments else len(arguments)
|
||||
extra = arguments[separator + 1:]
|
||||
args = parser.parse_args(arguments[:separator])
|
||||
if args.split_per_abi and args.platform != 'android':
|
||||
parser.error('--split-per-abi is only available for Android')
|
||||
return build_application(args.platform, flavor=args.flavor, mode=args.mode,
|
||||
split_per_abi=args.split_per_abi, extra=extra).returncode
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(cli(main))
|
||||
Reference in new issue
Block a user