Fixed cpl cli build #144
This commit is contained in:
parent
086fc75fec
commit
d5e89d6e2a
@ -15,7 +15,7 @@ __title__ = 'cpl_cli'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -28,4 +28,4 @@ from .main import main
|
|||||||
from .startup import Startup
|
from .startup import Startup
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli._templates'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli._templates.build'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli._templates.publish'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.abc'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"CLI": {
|
"CLI": {
|
||||||
"PipPath": "https://pip.sh-edraft.de"
|
"PipPath": "https://pip-dev.sh-edraft.de"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -29,4 +29,4 @@ from .publish_service import PublishService
|
|||||||
from .version_service import VersionService
|
from .version_service import VersionService
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -195,9 +195,8 @@ class GenerateService(CommandABC):
|
|||||||
schematic = s
|
schematic = s
|
||||||
break
|
break
|
||||||
|
|
||||||
schematic_by_alias = self._get_schematic_by_alias(args[0])
|
if schematic is None and len(args) >= 1 and (args[0] in self._schematics or self._get_schematic_by_alias(args[0]) != args[0]):
|
||||||
if schematic is None and len(args) >= 1 and (args[0] in self._schematics or schematic_by_alias != args[0]):
|
schematic = self._get_schematic_by_alias(args[0])
|
||||||
schematic = schematic_by_alias
|
|
||||||
self._config.add_configuration(schematic, args[1])
|
self._config.add_configuration(schematic, args[1])
|
||||||
value = args[1]
|
value = args[1]
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -31,4 +31,4 @@ from .workspace_settings import WorkspaceSettings
|
|||||||
from .workspace_settings_name_enum import WorkspaceSettingsNameEnum
|
from .workspace_settings_name_enum import WorkspaceSettingsNameEnum
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "2022",
|
"Major": "2022",
|
||||||
"Minor": "12",
|
"Minor": "12",
|
||||||
"Micro": "0"
|
"Micro": "dev144"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
@ -16,7 +16,7 @@
|
|||||||
"LicenseName": "MIT",
|
"LicenseName": "MIT",
|
||||||
"LicenseDescription": "MIT, see LICENSE for more details.",
|
"LicenseDescription": "MIT, see LICENSE for more details.",
|
||||||
"Dependencies": [
|
"Dependencies": [
|
||||||
"cpl-core>=2022.12.0"
|
"cpl-core>=2022.12.dev144"
|
||||||
],
|
],
|
||||||
"DevDependencies": [],
|
"DevDependencies": [],
|
||||||
"PythonVersion": ">=3.10",
|
"PythonVersion": ">=3.10",
|
||||||
@ -42,7 +42,8 @@
|
|||||||
],
|
],
|
||||||
"PackageData": {
|
"PackageData": {
|
||||||
"cpl_cli": [
|
"cpl_cli": [
|
||||||
"*.json"
|
"*.json",
|
||||||
|
".cpl/*.py"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ProjectReferences": []
|
"ProjectReferences": []
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.helper'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.live_server'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -9,6 +9,7 @@ from cpl_cli.startup_migration_extension import StartupMigrationExtension
|
|||||||
from cpl_cli.startup_workspace_extension import StartupWorkspaceExtension
|
from cpl_cli.startup_workspace_extension import StartupWorkspaceExtension
|
||||||
from cpl_core.application.application_builder import ApplicationBuilder
|
from cpl_core.application.application_builder import ApplicationBuilder
|
||||||
from cpl_core.application.startup_extension_abc import StartupExtensionABC
|
from cpl_core.application.startup_extension_abc import StartupExtensionABC
|
||||||
|
from cpl_core.console import Console
|
||||||
|
|
||||||
|
|
||||||
def get_startup_extensions() -> list[Type[StartupExtensionABC]]:
|
def get_startup_extensions() -> list[Type[StartupExtensionABC]]:
|
||||||
@ -40,6 +41,7 @@ def main():
|
|||||||
app_builder.use_extension(extension)
|
app_builder.use_extension(extension)
|
||||||
|
|
||||||
app_builder.build().run()
|
app_builder.build().run()
|
||||||
|
Console.write_line()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.migrations'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.migrations.base'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.migrations.service'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.publish'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -25,4 +25,4 @@ from .publisher_abc import PublisherABC
|
|||||||
from .publisher_service import PublisherService
|
from .publisher_service import PublisherService
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.source_creator'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -15,7 +15,7 @@ __title__ = 'cpl_cli.validators'
|
|||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||||
__version__ = '2022.12.0'
|
__version__ = '2022.12.dev144'
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major='2022', minor='12', micro='0')
|
version_info = VersionInfo(major='2022', minor='12', micro='dev144')
|
||||||
|
@ -56,7 +56,14 @@ class Application(ApplicationABC):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if branch.startswith('#'):
|
if suffix != '':
|
||||||
|
self._configuration.add_json_file(self._workspace.projects[self._workspace.default_project], optional=False, output=False)
|
||||||
|
ps: ProjectSettings = self._configuration.get_configuration(ProjectSettings)
|
||||||
|
|
||||||
|
version[VersionSettingsNameEnum.major.value] = ps.version.major
|
||||||
|
version[VersionSettingsNameEnum.minor.value] = ps.version.minor
|
||||||
|
version[VersionSettingsNameEnum.micro.value] = suffix
|
||||||
|
elif branch.startswith('#'):
|
||||||
self._configuration.add_json_file(self._workspace.projects[self._workspace.default_project], optional=False, output=False)
|
self._configuration.add_json_file(self._workspace.projects[self._workspace.default_project], optional=False, output=False)
|
||||||
ps: ProjectSettings = self._configuration.get_configuration(ProjectSettings)
|
ps: ProjectSettings = self._configuration.get_configuration(ProjectSettings)
|
||||||
|
|
||||||
@ -71,8 +78,6 @@ class Application(ApplicationABC):
|
|||||||
suffix = '0'
|
suffix = '0'
|
||||||
version[VersionSettingsNameEnum.micro.value] = f'{suffix}'
|
version[VersionSettingsNameEnum.micro.value] = f'{suffix}'
|
||||||
else:
|
else:
|
||||||
if not suffix.startswith('.') and suffix != '':
|
|
||||||
suffix = f'.{suffix}'
|
|
||||||
version[VersionSettingsNameEnum.micro.value] = f'{branch.split(".")[2]}{suffix}'
|
version[VersionSettingsNameEnum.micro.value] = f'{branch.split(".")[2]}{suffix}'
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Console.error(f'Branch {branch} does not contain valid version')
|
Console.error(f'Branch {branch} does not contain valid version')
|
||||||
|
Loading…
Reference in New Issue
Block a user