diff --git a/src/cpl_cli/.cpl/__init__.py b/src/cpl_cli/.cpl/__init__.py index f96d10fb..384e3fa0 100644 --- a/src/cpl_cli/.cpl/__init__.py +++ b/src/cpl_cli/.cpl/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index a2165c57..d5c71351 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -28,4 +28,4 @@ from .main import main from .startup import Startup VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index 46d358eb..506557ff 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli._templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index 9bc534ca..e006bf80 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli._templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index 1778daf8..46a92128 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli._templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/abc/__init__.py b/src/cpl_cli/abc/__init__.py index aa793603..609ba749 100644 --- a/src/cpl_cli/abc/__init__.py +++ b/src/cpl_cli/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.abc' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/appsettings.json b/src/cpl_cli/appsettings.json index f4dbfbf1..eb80fe1d 100644 --- a/src/cpl_cli/appsettings.json +++ b/src/cpl_cli/appsettings.json @@ -1,5 +1,5 @@ { "CLI": { - "PipPath": "https://pip.sh-edraft.de" + "PipPath": "https://pip-dev.sh-edraft.de" } } \ No newline at end of file diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index 49b2f0c6..3cb16ed4 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -29,4 +29,4 @@ from .publish_service import PublishService from .version_service import VersionService VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/command/generate_service.py b/src/cpl_cli/command/generate_service.py index 1b686102..eb42bd04 100644 --- a/src/cpl_cli/command/generate_service.py +++ b/src/cpl_cli/command/generate_service.py @@ -195,9 +195,8 @@ class GenerateService(CommandABC): schematic = s 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 schematic_by_alias != args[0]): - schematic = schematic_by_alias + if schematic is None and len(args) >= 1 and (args[0] in self._schematics or self._get_schematic_by_alias(args[0]) != args[0]): + schematic = self._get_schematic_by_alias(args[0]) self._config.add_configuration(schematic, args[1]) value = args[1] diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index 7b7a2e32..cd0a9ef5 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -31,4 +31,4 @@ from .workspace_settings import WorkspaceSettings from .workspace_settings_name_enum import WorkspaceSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/cpl-cli.json b/src/cpl_cli/cpl-cli.json index 3c57ece9..04b7fd6b 100644 --- a/src/cpl_cli/cpl-cli.json +++ b/src/cpl_cli/cpl-cli.json @@ -4,7 +4,7 @@ "Version": { "Major": "2022", "Minor": "12", - "Micro": "0" + "Micro": "dev144" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.12.0" + "cpl-core>=2022.12.dev144" ], "DevDependencies": [], "PythonVersion": ">=3.10", @@ -42,7 +42,8 @@ ], "PackageData": { "cpl_cli": [ - "*.json" + "*.json", + ".cpl/*.py" ] }, "ProjectReferences": [] diff --git a/src/cpl_cli/helper/__init__.py b/src/cpl_cli/helper/__init__.py index 9bc349e4..0db1862a 100644 --- a/src/cpl_cli/helper/__init__.py +++ b/src/cpl_cli/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.helper' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index de32b9f4..4b74e088 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/main.py b/src/cpl_cli/main.py index df1c6a9a..4bf4d83d 100644 --- a/src/cpl_cli/main.py +++ b/src/cpl_cli/main.py @@ -9,6 +9,7 @@ from cpl_cli.startup_migration_extension import StartupMigrationExtension from cpl_cli.startup_workspace_extension import StartupWorkspaceExtension from cpl_core.application.application_builder import ApplicationBuilder from cpl_core.application.startup_extension_abc import StartupExtensionABC +from cpl_core.console import Console def get_startup_extensions() -> list[Type[StartupExtensionABC]]: @@ -40,6 +41,7 @@ def main(): app_builder.use_extension(extension) app_builder.build().run() + Console.write_line() if __name__ == '__main__': diff --git a/src/cpl_cli/migrations/__init__.py b/src/cpl_cli/migrations/__init__.py index 83b95050..fca9b7d7 100644 --- a/src/cpl_cli/migrations/__init__.py +++ b/src/cpl_cli/migrations/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.migrations' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/migrations/base/__init__.py b/src/cpl_cli/migrations/base/__init__.py index db9830c8..2872e0a6 100644 --- a/src/cpl_cli/migrations/base/__init__.py +++ b/src/cpl_cli/migrations/base/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.migrations.base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/migrations/service/__init__.py b/src/cpl_cli/migrations/service/__init__.py index ad460fb4..6a9679f5 100644 --- a/src/cpl_cli/migrations/service/__init__.py +++ b/src/cpl_cli/migrations/service/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.migrations.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index 4ddae317..51b16998 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -25,4 +25,4 @@ from .publisher_abc import PublisherABC from .publisher_service import PublisherService VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index c15325b7..102b512c 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index cf262422..f782995b 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.validators' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.12.0' +__version__ = '2022.12.dev144' from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='12', micro='0') +version_info = VersionInfo(major='2022', minor='12', micro='dev144') diff --git a/tools/set_version/application.py b/tools/set_version/application.py index 6b61c7f1..c4cc9763 100644 --- a/tools/set_version/application.py +++ b/tools/set_version/application.py @@ -56,7 +56,14 @@ class Application(ApplicationABC): return 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) ps: ProjectSettings = self._configuration.get_configuration(ProjectSettings) @@ -71,8 +78,6 @@ class Application(ApplicationABC): suffix = '0' version[VersionSettingsNameEnum.micro.value] = f'{suffix}' else: - if not suffix.startswith('.') and suffix != '': - suffix = f'.{suffix}' version[VersionSettingsNameEnum.micro.value] = f'{branch.split(".")[2]}{suffix}' except Exception as e: Console.error(f'Branch {branch} does not contain valid version')