Skip to content

Commit 8c1ecca

Browse files
committed
[IMP] merge: publish wheels also in nobump mode
This exception was probably done with the goal of saving space, but for migration PRs where people use ocabot merge nobump, we want to publish too.
1 parent 7c4c4ac commit 8c1ecca

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Diff for: newsfragments/123.feature

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Publish wheels also in nobump mode. This exception was probably done with the
2+
goal of saving space, but for migration PRs where people use ``ocabot merge
3+
nobump``, we want to publish too.

Diff for: src/oca_github_bot/tasks/merge_bot.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ def _merge_bot_merge_pr(org, repo, merge_bot_branch, cwd, dry_run=False):
141141
d for d in modified_addon_dirs if is_addon_dir(d, installable_only=True)
142142
]
143143

144-
# update HISTORY.rst using towncrier, before generating README.rst
144+
# Update HISTORY.rst using towncrier, before generating README.rst.
145+
# We don't do this if nobump is specified, because updating the changelog
146+
# is something we only do when "releasing", and patch|minor|major is
147+
# the way to mean "release" in OCA.
145148
if bumpversion_mode != "nobump":
146149
_merge_bot_towncrier(
147150
org,
@@ -165,7 +168,7 @@ def _merge_bot_merge_pr(org, repo, merge_bot_branch, cwd, dry_run=False):
165168
# so setuptools-odoo generates a round version number
166169
# (without .dev suffix).
167170
bump_manifest_version(addon_dir, bumpversion_mode, git_commit=True)
168-
build_and_check_wheel(addon_dir)
171+
build_and_check_wheel(addon_dir)
169172
if dry_run:
170173
_logger.info(f"DRY-RUN git push in {org}/{repo}@{target_branch}")
171174
else:
@@ -174,11 +177,7 @@ def _merge_bot_merge_pr(org, repo, merge_bot_branch, cwd, dry_run=False):
174177
["git", "push", "origin", f"{merge_bot_branch}:{target_branch}"], cwd=cwd
175178
)
176179
# build and publish wheel
177-
if (
178-
bumpversion_mode != "nobump"
179-
and modified_installable_addon_dirs
180-
and SIMPLE_INDEX_ROOT
181-
):
180+
if modified_installable_addon_dirs and SIMPLE_INDEX_ROOT:
182181
for addon_dir in modified_installable_addon_dirs:
183182
build_and_publish_wheel(addon_dir, SIMPLE_INDEX_ROOT, dry_run)
184183
# TODO wlc unlock modified_addons

0 commit comments

Comments
 (0)