keiyoushi-extensions-source/.github/scripts/move-apks.py
beerpsi c5c2a09392 ci: Port move-apks and create-repo to Python (#194)
* ci: Port move-apks and create-repo to Python

* move-apks: Fix APK path
2024-01-13 01:52:40 +06:00

17 lines
359 B
Python

from pathlib import Path
import shutil
REPO_APK_DIR = Path("repo/apk")
try:
shutil.rmtree(REPO_APK_DIR)
except FileNotFoundError:
pass
REPO_APK_DIR.mkdir(parents=True, exist_ok=True)
for apk in (Path.home() / "apk-artifacts").glob("**/*.apk"):
apk_name = apk.name.replace("-release.apk", ".apk")
shutil.move(apk, REPO_APK_DIR / apk_name)