Minor bugfixes with custom scripts
This commit is contained in:
parent
450295cfcf
commit
3727af11c4
@ -57,7 +57,8 @@ class RemoveService(CommandABC):
|
|||||||
ws_dict = {
|
ws_dict = {
|
||||||
WorkspaceSettings.__name__: {
|
WorkspaceSettings.__name__: {
|
||||||
WorkspaceSettingsNameEnum.default_project.value: self._workspace.default_project,
|
WorkspaceSettingsNameEnum.default_project.value: self._workspace.default_project,
|
||||||
WorkspaceSettingsNameEnum.projects.value: self._workspace.projects
|
WorkspaceSettingsNameEnum.projects.value: self._workspace.projects,
|
||||||
|
WorkspaceSettingsNameEnum.scripts.value: self._workspace.scripts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,12 +39,12 @@ class ConsoleBuilder:
|
|||||||
project_json.close()
|
project_json.close()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _create_workspace(cls, path: str, project_name, projects: dict):
|
def _create_workspace(cls, path: str, project_name, projects: dict, scripts: dict):
|
||||||
ws_dict = {
|
ws_dict = {
|
||||||
WorkspaceSettings.__name__: {
|
WorkspaceSettings.__name__: {
|
||||||
WorkspaceSettingsNameEnum.default_project.value: project_name,
|
WorkspaceSettingsNameEnum.default_project.value: project_name,
|
||||||
WorkspaceSettingsNameEnum.projects.value: projects,
|
WorkspaceSettingsNameEnum.projects.value: projects,
|
||||||
WorkspaceSettingsNameEnum.scripts.value: {}
|
WorkspaceSettingsNameEnum.scripts.value: scripts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,14 +151,18 @@ class ConsoleBuilder:
|
|||||||
workspace_file_path = f'{proj_name}/cpl-workspace.json'
|
workspace_file_path = f'{proj_name}/cpl-workspace.json'
|
||||||
project_file_rel_path = f'{src_path}/{project_name}.json'
|
project_file_rel_path = f'{src_path}/{project_name}.json'
|
||||||
project_file_path = f'{proj_name}/{src_path}/{project_name}.json'
|
project_file_path = f'{proj_name}/{src_path}/{project_name}.json'
|
||||||
cls._create_workspace(workspace_file_path, project_name, {
|
cls._create_workspace(
|
||||||
project_name: project_file_rel_path
|
workspace_file_path,
|
||||||
})
|
project_name,
|
||||||
|
{
|
||||||
|
project_name: project_file_rel_path
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
workspace.projects[project_name] = f'src/{project_file_path}'
|
workspace.projects[project_name] = f'src/{project_file_path}'
|
||||||
cls._create_workspace('cpl-workspace.json',
|
cls._create_workspace('cpl-workspace.json', workspace.default_project, workspace.projects, workspace.scripts)
|
||||||
workspace.default_project, workspace.projects)
|
|
||||||
|
|
||||||
Console.spinner(
|
Console.spinner(
|
||||||
f'Creating {project_file_path}',
|
f'Creating {project_file_path}',
|
||||||
|
@ -154,14 +154,18 @@ class LibraryBuilder:
|
|||||||
workspace_file_path = f'{proj_name}/cpl-workspace.json'
|
workspace_file_path = f'{proj_name}/cpl-workspace.json'
|
||||||
project_file_rel_path = f'{src_path}/{project_name}.json'
|
project_file_rel_path = f'{src_path}/{project_name}.json'
|
||||||
project_file_path = f'{proj_name}/{src_path}/{project_name}.json'
|
project_file_path = f'{proj_name}/{src_path}/{project_name}.json'
|
||||||
cls._create_workspace(workspace_file_path, project_name, {
|
cls._create_workspace(
|
||||||
project_name: project_file_rel_path
|
workspace_file_path,
|
||||||
})
|
project_name,
|
||||||
|
{
|
||||||
|
project_name: project_file_rel_path
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
workspace.projects[project_name] = f'src/{project_file_path}'
|
workspace.projects[project_name] = f'src/{project_file_path}'
|
||||||
cls._create_workspace('cpl-workspace.json',
|
cls._create_workspace('cpl-workspace.json', workspace.default_project, workspace.projects, workspace.scripts)
|
||||||
workspace.default_project, workspace.projects)
|
|
||||||
|
|
||||||
Console.spinner(
|
Console.spinner(
|
||||||
f'Creating {project_file_path}',
|
f'Creating {project_file_path}',
|
||||||
|
Loading…
Reference in New Issue
Block a user