mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 22:37:00 +08:00
Add: Update Submodule
This commit is contained in:
@@ -18,6 +18,9 @@ class ConfigModel:
|
||||
AutoUpdate: bool = True
|
||||
KeepLocalChanges: bool = False
|
||||
|
||||
# Plugins
|
||||
MaaAssistantArknights: bool = False
|
||||
|
||||
# Python
|
||||
PythonExecutable: str = "./toolkit/python.exe"
|
||||
PypiMirror: Optional[bool] = None
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import os
|
||||
|
||||
from deploy.config import DeployConfig
|
||||
from deploy.logger import logger
|
||||
from deploy.utils import *
|
||||
@@ -66,3 +68,18 @@ class GitManager(DeployConfig):
|
||||
proxy=self.GitProxy,
|
||||
keep_changes=self.KeepLocalChanges,
|
||||
)
|
||||
logger.hr('Update Submodule', 0)
|
||||
if self.MaaAssistantArknights:
|
||||
repo = 'https://github.com/SaiCateDoan/AlasMaaBridge'
|
||||
folder = './submodule/AlasMaaBridge'
|
||||
os.makedirs(folder, exist_ok=True)
|
||||
prev = os.getcwd()
|
||||
os.chdir(folder)
|
||||
self.git_repository_init(
|
||||
repo=repo,
|
||||
source='origin',
|
||||
branch='master',
|
||||
proxy=self.GitProxy,
|
||||
keep_changes=self.KeepLocalChanges
|
||||
)
|
||||
os.chdir(prev)
|
||||
|
||||
@@ -25,6 +25,9 @@ Deploy:
|
||||
# [Other] Use false
|
||||
KeepLocalChanges: false
|
||||
|
||||
Plugins:
|
||||
MaaAssistantArknights: false
|
||||
|
||||
Python:
|
||||
# Filepath of python executable `python.exe`
|
||||
# [Easy installer] Use './toolkit/python.exe'
|
||||
|
||||
Reference in New Issue
Block a user