2022.6 #88

Merged
edraft merged 158 commits from 2022.6 into master 2022-06-29 17:50:07 +02:00
2 changed files with 14 additions and 2 deletions
Showing only changes of commit beadbf8e91 - Show all commits

View File

@ -70,13 +70,15 @@ class Application(ApplicationABC):
diff_paths.append(os.path.basename(os.path.dirname(file)))
try:
skipped = []
for project in self._workspace.projects:
if project not in diff_paths and String.convert_to_snake_case(project) not in diff_paths and not force:
Console.write_line(f'Skipping {project} due to missing changes')
skipped.append(project)
continue
Console.write_line(f'Set dependencies {self._version_pipe.transform(version)} for {project}')
self._version_setter.set_dependencies(self._workspace.projects[project], version)
self._version_setter.set_dependencies(self._workspace.projects[project], version, skipped=skipped)
if not project.startswith('cpl') and not project.startswith('unittest'):
Console.write_line(f'Skipping {project}')
continue

View File

@ -1,5 +1,8 @@
import json
import os
from string import ascii_letters
from cpl_core.utils import String
from cpl_core.console import Console
@ -30,7 +33,7 @@ class VersionSetterService:
project_json['ProjectSettings']['Version'] = version
self._write_file(file, project_json)
def set_dependencies(self, file: str, version: dict):
def set_dependencies(self, file: str, version: dict, skipped=None):
project_json = self._read_file(file)
dependencies = project_json['ProjectSettings']['Dependencies']
new_deps = []
@ -40,6 +43,13 @@ class VersionSetterService:
continue
dep_version = dependency.split('=')[1]
dep_name = dependency.split('=')[0]
if dep_name[len(dep_name)-1] not in ascii_letters:
dep_name = dep_name[:len(dep_name)-1]
if skipped is not None and (dep_name in skipped or String.convert_to_snake_case(dep_name) in skipped):
new_deps.append(dependency)
continue
new_deps.append(dependency.replace(dep_version, f'{version["Major"]}.{version["Minor"]}.{version["Micro"]}'))
project_json['ProjectSettings']['Dependencies'] = new_deps