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

feat: Switch to self-hosted git repo mirror for cn users

This commit is contained in:
2023-11-03 17:08:04 +08:00
parent 22647a5e36
commit 51305f7c0b
3 changed files with 3 additions and 307 deletions
+3 -5
View File
@@ -65,9 +65,6 @@ class ConfigModel:
AppAsarUpdate: bool = True
NoSandbox: bool = True
# Dynamic
GitOverCdn: bool = False
class DeployConfig(ConfigModel):
def __init__(self, file=DEPLOY_CONFIG):
@@ -82,8 +79,9 @@ class DeployConfig(ConfigModel):
# Bypass webui.config.DeployConfig.__setattr__()
# Don't write these into deploy.yaml
super().__setattr__('GitOverCdn', self.Repository in ['cn'])
if self.Repository in ['global', 'cn']:
if self.Repository == 'cn':
super().__setattr__('Repository', 'https://git.yoursfunny.top/YoursFunny/ArisuAutoSweeper.git')
if self.Repository == 'global':
super().__setattr__('Repository', 'https://github.com/TheFunny/ArisuAutoSweeper')
self.write()
-36
View File
@@ -4,7 +4,6 @@ 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
class GitConfigParser(configparser.ConfigParser):
@@ -17,25 +16,6 @@ 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 GitManager(DeployConfig):
@staticmethod
def remove(file):
@@ -128,18 +108,6 @@ 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
def git_install(self):
logger.hr('Update Alas', 0)
@@ -148,10 +116,6 @@ 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',