mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-12-24 02:12:59 +00:00
marker
This commit is contained in:
parent
267f85fa8d
commit
0060bf8878
4 changed files with 5 additions and 5 deletions
|
@ -12,7 +12,7 @@ runtime:
|
|||
|
||||
markers:
|
||||
project: .project
|
||||
down: .down
|
||||
disabled: .disabled
|
||||
|
||||
network:
|
||||
name: kiwi_hub
|
||||
|
|
|
@ -6,7 +6,7 @@ runtime:
|
|||
env: null
|
||||
markers:
|
||||
project: .project
|
||||
down: .down
|
||||
disabled: .disabled
|
||||
network:
|
||||
name: kiwi_hub
|
||||
cidr: 10.22.46.0/24
|
||||
|
|
|
@ -58,7 +58,7 @@ class InitCommand(SubCommand):
|
|||
|
||||
# markers
|
||||
user_input(config, 'markers:project', "Enter marker string for project directories")
|
||||
user_input(config, 'markers:down', "Enter marker string for disabled projects")
|
||||
user_input(config, 'markers:disabled', "Enter marker string for disabled projects")
|
||||
|
||||
# network
|
||||
user_input(config, 'network:name', "Enter name for local docker network")
|
||||
|
|
|
@ -26,7 +26,7 @@ class Project:
|
|||
return f"{self.__name}{LoadedConfig.get()['markers:project']}"
|
||||
|
||||
def disabled_dir_name(self):
|
||||
return f"{self.enabled_dir_name()}{LoadedConfig.get()['markers:down']}"
|
||||
return f"{self.enabled_dir_name()}{LoadedConfig.get()['markers:disabled']}"
|
||||
|
||||
def conf_dir_name(self):
|
||||
return os.path.join(self.dir_name(), CONF_DIRECTORY_NAME)
|
||||
|
@ -81,7 +81,7 @@ class Project:
|
|||
def _extract_project_name(file_name):
|
||||
config = LoadedConfig.get()
|
||||
enabled_suffix = config['markers:project']
|
||||
disabled_suffix = f"{enabled_suffix}{config['markers:down']}"
|
||||
disabled_suffix = f"{enabled_suffix}{config['markers:disabled']}"
|
||||
|
||||
if os.path.isdir(file_name):
|
||||
# all subdirectories
|
||||
|
|
Loading…
Reference in a new issue