Skip to content

Commit

Permalink
update message
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed Sep 12, 2024
1 parent 4f36752 commit c908c41
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps_ci/scripts/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ def update_app_version(app_path: str, bump_type: str, dep_name: str, dep_version
with open(str(app_metadata_file), 'r') as f:
app_config = yaml.safe_load(f.read())

msg = ''
if dep_name and dep_version and is_main_dep(app_dir, dep_name):
app_config['app_version'] = dep_version
msg += f', set app_version to {dep_version!r}'
if bump_type:
old_version = app_config['version']
app_config['version'] = bump_version(old_version, bump_type)
rename_versioned_dir(old_version, app_config['version'], app_dir.parent.name, app_dir)
msg += f' and bumped version from {old_version!r} to {app_config["version"]!r}'

with open(str(app_metadata_file), 'w') as f:
f.write(yaml.safe_dump(app_config))

print(
f'[\033[92mOK\x1B[0m]\tUpdated app {app_dir.name!r} version from {old_version!r} to {app_config["version"]!r}'
)
print(f'[\033[92mOK\x1B[0m]\tUpdated app {app_dir.name!r}' + msg)


def main():
Expand Down

0 comments on commit c908c41

Please sign in to comment.