Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions odoo_tools/utils/marabunta.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, path_obj):
def load(self):
return yaml.yaml_load(self.path_obj.open())

def update(self, version, run_click_hook="post"):
def update(self, version):
data = self.load()
versions = data["migration"]["versions"]
version_item = [x for x in versions if x["version"] == version]
Expand All @@ -19,17 +19,8 @@ def update(self, version, run_click_hook="post"):
else:
version_item = {"version": version}
versions.append(version_item)
if not version_item.get("operations"):
version_item["operations"] = {}
operations = version_item["operations"]
cmd = self._make_click_odoo_update_cmd()
if cmd not in operations.get(run_click_hook, []):
operations.setdefault(run_click_hook, []).append(cmd)
yaml.update_yml_file(self.path_obj, data)

def _make_click_odoo_update_cmd(self):
return "click-odoo-update"

def get_migration_file_modules(self):
"""Read the migration.yml and get module list."""
content = self.load()
Expand Down
1 change: 0 additions & 1 deletion tests/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def test_bump_update_marabunta_file():
content = config.marabunta_mig_file_rel_path.read_text()
# TODO: improve these checks
assert "14.0.0.2.0" in content
assert "click-odoo-update" in content
assert result.output.splitlines() == [
"Running: bumpversion minor",
"Running: towncrier build --yes --version=14.0.0.2.0",
Expand Down