Fixed set-version

This commit is contained in:
Sven Heidemann 2022-07-16 16:07:39 +02:00
parent 5165f31066
commit 1cd9c7d669
3 changed files with 5 additions and 4 deletions

View File

@ -15,7 +15,7 @@ __title__ = 'set_version'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de' __copyright__ = 'Copyright (c) 2022 sh-edraft.de'
__version__ = '2022.6.0' __version__ = '2022.7.0'
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='6', micro='0') version_info = VersionInfo(major='2022', minor='7', micro='0')

View File

@ -3,7 +3,7 @@
"Name": "set-version", "Name": "set-version",
"Version": { "Version": {
"Major": "2022", "Major": "2022",
"Minor": "6", "Minor": "7",
"Micro": "0" "Micro": "0"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",

View File

@ -50,9 +50,10 @@ class VersionSetterService:
if dep_name[len(dep_name)-1] not in ascii_letters: if dep_name[len(dep_name)-1] not in ascii_letters:
dep_name = dep_name[:len(dep_name)-1] 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): if skipped is not None and (dep_name in skipped or String.convert_to_snake_case(dep_name) in skipped) or dep_version == '':
new_deps.append(dependency) new_deps.append(dependency)
continue continue
new_deps.append(dependency.replace(dep_version, f'{version["Major"]}.{version["Minor"]}.{version["Micro"]}')) new_deps.append(dependency.replace(dep_version, f'{version["Major"]}.{version["Minor"]}.{version["Micro"]}'))
project_json['ProjectSettings'][key] = new_deps project_json['ProjectSettings'][key] = new_deps