chore: MaaDeps cache asset (#15933)

This commit is contained in:
Hao Guan
2026-03-07 13:05:07 +08:00
committed by GitHub
parent 8187063a0b
commit fd70de22fb
3 changed files with 12 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ pushd ${basedir}
build_arch() {
[[ $1 = "arm64" ]] && triplet="arm64-osx" || triplet="x64-osx"
python3 tools/maadeps-download.py ${triplet}
python3 tools/maadeps-download.py --cache-asset ${triplet}
if [[ -n $(which ccache) ]]; then
export CMAKE_C_COMPILER_LAUNCHER=ccache

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import argparse
import sys
from pathlib import Path
@@ -11,10 +12,16 @@ from maadeps_download import main as download_main
REPO = "MaaAssistantArknights/MaaDeps"
VERSION = "v2.10.1-maa.1"
parser = argparse.ArgumentParser()
parser.add_argument("triplet", nargs="?")
parser.add_argument("--cache-asset", action="store_true")
if __name__ == "__main__":
if len(sys.argv) == 2:
target_triplet = sys.argv[1]
args = parser.parse_args()
if args.triplet:
target_triplet = args.triplet
else:
target_triplet = detect_host_triplet()
download_main(target_triplet, REPO, VERSION)
download_main(target_triplet, REPO, VERSION, args.cache_asset)