mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-23 05:19:29 +08:00
Merge branch 'master_lme'
# Conflicts: # deploy/Windows/config.py # deploy/Windows/git.py # deploy/Windows/logger.py
This commit is contained in:
@@ -2,9 +2,9 @@ import configparser
|
||||
import os
|
||||
|
||||
from deploy.Windows.config import DeployConfig
|
||||
from deploy.git_over_cdn.client import GitOverCdnClient
|
||||
from deploy.Windows.logger import Progress, logger
|
||||
from deploy.Windows.utils import cached_property
|
||||
|
||||
from deploy.Windows.utils import *
|
||||
|
||||
class GitConfigParser(configparser.ConfigParser):
|
||||
def check(self, section, option, value):
|
||||
@@ -108,6 +108,18 @@ 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/1818706573/pack/LmeSzinc_AzurLaneAutoScript_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)
|
||||
|
||||
@@ -116,6 +128,10 @@ class GitManager(DeployConfig):
|
||||
Progress.GitShowVersion()
|
||||
return
|
||||
|
||||
if self.GitOverCdn:
|
||||
if self.goc_client.update(keep_changes=self.KeepLocalChanges):
|
||||
return
|
||||
|
||||
self.git_repository_init(
|
||||
repo=self.Repository,
|
||||
source='origin',
|
||||
|
||||
Reference in New Issue
Block a user