-
-
Notifications
You must be signed in to change notification settings - Fork 801
Expand file tree
/
Copy pathbuild-all.py
More file actions
executable file
·73 lines (62 loc) · 2.23 KB
/
build-all.py
File metadata and controls
executable file
·73 lines (62 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env python
"""
Convenience script for building all release variants at once.
"""
import os
import sys
import subprocess
import platform
def run_make_release(*args):
"""Run make-release.py with the given arguments"""
cmd = [sys.executable, 'scripts/make-release.py'] + list(args)
print(f"Building with arguments: {' '.join(args)}")
try:
result = subprocess.run(cmd, check=True)
print(f"Build completed successfully: {' '.join(args)}")
print()
return True
except subprocess.CalledProcessError as e:
print(f"Failed to build with arguments: {' '.join(args)}")
print(f"Exit code: {e.returncode}")
return False
except Exception as e:
print(f"Unexpected error: {e}")
return False
def main():
"""Main build process"""
print("Starting build-all process...")
print("This will build multiple release variants sequentially.")
print(f"Platform: {platform.system()} {platform.release()}")
print()
# Check if we're in the right directory
if not os.path.exists('scripts/make-release.py'):
print("Error: scripts/make-release.py not found!")
print(" Please run this script from the project root directory.")
sys.exit(1)
builds = [
# (description, args)
("Beta bundle", ["--beta", "--bundle"]),
("Production bundle", ["--prod", "--bundle"]),
("Amazon APK", ["--channel", "amazon"]),
("Samsung APK", ["--channel", "samsung"]),
("Huawei APK", ["--channel", "huawei"]),
]
success_count = 0
total_builds = len(builds)
for description, args in builds:
print(f"Building {description}...")
if run_make_release(*args):
success_count += 1
else:
print(f"Build failed for {description}")
print(" Stopping build process.")
break
print("=" * 50)
if success_count == total_builds:
print(f"All {total_builds} builds completed successfully!")
print("Check the releases/ directory for output files.")
else:
print(f" {success_count}/{total_builds} builds completed successfully.")
sys.exit(1)
if __name__ == "__main__":
main()