1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-06-09 20:04:52 +00:00

fix: Adapt for AAS

This commit is contained in:
2023-11-01 17:04:20 +08:00
parent 6860f2eb72
commit 3c4c9a6d61
11 changed files with 106 additions and 55 deletions
+32 -32
View File
@@ -4,7 +4,7 @@ import os
from deploy.Windows.config import DeployConfig
from deploy.Windows.logger import Progress, logger
from deploy.Windows.utils import cached_property
from deploy.git_over_cdn.client import GitOverCdnClient
# from deploy.git_over_cdn.client import GitOverCdnClient
class GitConfigParser(configparser.ConfigParser):
@@ -17,23 +17,23 @@ class GitConfigParser(configparser.ConfigParser):
return False
class GitOverCdnClientWindows(GitOverCdnClient):
def update(self, *args, **kwargs):
Progress.GitInit()
_ = super().update(*args, **kwargs)
Progress.GitShowVersion()
return _
@cached_property
def latest_commit(self) -> str:
_ = super().latest_commit
Progress.GitLatestCommit()
return _
def download_pack(self):
_ = super().download_pack()
Progress.GitDownloadPack()
return _
# class GitOverCdnClientWindows(GitOverCdnClient):
# def update(self, *args, **kwargs):
# Progress.GitInit()
# _ = super().update(*args, **kwargs)
# Progress.GitShowVersion()
# return _
#
# @cached_property
# def latest_commit(self) -> str:
# _ = super().latest_commit
# Progress.GitLatestCommit()
# return _
#
# def download_pack(self):
# _ = super().download_pack()
# Progress.GitDownloadPack()
# return _
class GitManager(DeployConfig):
@@ -128,17 +128,17 @@ class GitManager(DeployConfig):
self.execute(f'"{self.git}" --no-pager log --no-merges -1')
Progress.GitShowVersion()
@property
def goc_client(self):
client = GitOverCdnClient(
url='https://vip.123pan.cn/1815343254/pack/LmeSzinc_StarRailCopilot_master',
folder=self.root_filepath,
source='origin',
branch='master',
git=self.git,
)
client.logger = logger
return client
# @property
# def goc_client(self):
# client = GitOverCdnClient(
# url='https://vip.123pan.cn/1815343254/pack/LmeSzinc_StarRailCopilot_master',
# folder=self.root_filepath,
# source='origin',
# branch='master',
# git=self.git,
# )
# client.logger = logger
# return client
def git_install(self):
logger.hr('Update Alas', 0)
@@ -148,9 +148,9 @@ class GitManager(DeployConfig):
Progress.GitShowVersion()
return
if self.GitOverCdn:
if self.goc_client.update(keep_changes=self.KeepLocalChanges):
return
# if self.GitOverCdn:
# if self.goc_client.update(keep_changes=self.KeepLocalChanges):
# return
self.git_repository_init(
repo=self.Repository,
+1 -1
View File
@@ -2,7 +2,7 @@ Deploy:
Git:
# URL of AzurLaneAutoScript repository
# [CN user] Use 'cn' to get update from git-over-cdn service
# [Other] Use 'global' to get update from https://github.com/LmeSzinc/StarRailCopilot
# [Other] Use 'global' to get update from https://github.com/TheFunny/ArisuAutoSrcipt
Repository: 'global'
# Branch of Alas
# [Developer] Use 'dev', 'app', etc, to try new features