mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 18:32:39 +01:00
c5c2a09392
* ci: Port move-apks and create-repo to Python * move-apks: Fix APK path
17 lines
359 B
Python
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)
|