mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Opt: Shorten the show of deploy config
- Fix: requirements.txt with <space>
This commit is contained in:
parent
7594f02444
commit
f7073fbff3
@ -1,3 +1,5 @@
|
|||||||
|
import copy
|
||||||
|
|
||||||
from deploy.utils import *
|
from deploy.utils import *
|
||||||
|
|
||||||
|
|
||||||
@ -22,10 +24,15 @@ class DeployConfig:
|
|||||||
for k, v in self.config.items():
|
for k, v in self.config.items():
|
||||||
if k in ('Password', 'ApiToken'):
|
if k in ('Password', 'ApiToken'):
|
||||||
continue
|
continue
|
||||||
|
if self.config_template[k] == v:
|
||||||
|
continue
|
||||||
print(f'{k}: {v}')
|
print(f'{k}: {v}')
|
||||||
|
|
||||||
|
print(f'Rest of the configs are the same as {DEPLOY_TEMPLATE}')
|
||||||
|
|
||||||
def read(self):
|
def read(self):
|
||||||
self.config = poor_yaml_read(DEPLOY_TEMPLATE)
|
self.config = poor_yaml_read(DEPLOY_TEMPLATE)
|
||||||
|
self.config_template = copy.deepcopy(self.config)
|
||||||
self.config.update(poor_yaml_read(self.file))
|
self.config.update(poor_yaml_read(self.file))
|
||||||
|
|
||||||
def write(self):
|
def write(self):
|
||||||
|
|||||||
@ -11,6 +11,9 @@ class PipManager(DeployConfig):
|
|||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def requirements_file(self):
|
def requirements_file(self):
|
||||||
|
if self.config['RequirementsFile'] == 'requirements.txt':
|
||||||
|
return 'requirements.txt'
|
||||||
|
else:
|
||||||
return self.filepath("RequirementsFile")
|
return self.filepath("RequirementsFile")
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user