INNER CODE UNIT · Python
upload_apks
wikimedia/apps-android-wikipedia · upload-all.py:30
def upload_apks(name, pattern, upload_path):
"""Upload APK files matching the pattern to the specified path"""
files = glob.glob(pattern)
if files:
try:
subprocess.run(['scp'] + files + [upload_path], check=True)
return True
except subprocess.CalledProcessError as e:
print(f"✗ Failed to upload {name} APKs: {e}")
sys.exit(1)
else:
print(f"No {name} APKs found to upload")
return False
def main():
upload_count = 0