Give 'file' a more descriptive name

This commit is contained in:
bom 2023-02-23 14:23:32 +01:00
parent 0df4db54d8
commit 992c72bda3

View file

@ -13,7 +13,7 @@ def create_release_mixin_config(config_file, main_branch) -> dict:
config.update(
{'ReleaseMixin':
{'main_branch': main_branch,
'file': config_file}})
'config_file': config_file}})
return config
def add_versions(config, release_version, bump_version) -> dict:
@ -27,9 +27,9 @@ class ReleaseMixin(DevopsBuild):
def __init__(self, project, config):
super().__init__(project, config)
release_mixin_config = config['ReleaseMixin']
self.file = release_mixin_config['file']
self.config_file = release_mixin_config['config_file']
self.main_branch = release_mixin_config['main_branch']
self.version_repo = VersionRepository(self.file)
self.version_repo = VersionRepository(self.config_file)
self.release_version = None
self.bump_version = None
self.commit_string = None
@ -45,7 +45,7 @@ class ReleaseMixin(DevopsBuild):
raise Exception('Trying to release while not on main branch')
self.version_repo.write_file(version.get_version_string())
git_repository.add_file(self.file)
git_repository.add_file(self.config_file)
match version.release_type:
case None:
raise Exception('Release type not set but trying to commit.')