Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] merge: publish wheels also in nobump mode #123

Merged
merged 1 commit into from
Jul 19, 2020
Merged
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
3 changes: 3 additions & 0 deletions newsfragments/123.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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.
13 changes: 6 additions & 7 deletions src/oca_github_bot/tasks/merge_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ def _merge_bot_merge_pr(org, repo, merge_bot_branch, cwd, dry_run=False):
d for d in modified_addon_dirs if is_addon_dir(d, installable_only=True)
]

# update HISTORY.rst using towncrier, before generating README.rst
# Update HISTORY.rst using towncrier, before generating README.rst.
# We don't do this if nobump is specified, because updating the changelog
# is something we only do when "releasing", and patch|minor|major is
# the way to mean "release" in OCA.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this means that - say - 13.0.1.0.0 is not added to the history?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simahawk Yes. There is #54 to discuss the special case of migration PRs.

if bumpversion_mode != "nobump":
_merge_bot_towncrier(
org,
Expand All @@ -165,7 +168,7 @@ def _merge_bot_merge_pr(org, repo, merge_bot_branch, cwd, dry_run=False):
# so setuptools-odoo generates a round version number
# (without .dev suffix).
bump_manifest_version(addon_dir, bumpversion_mode, git_commit=True)
build_and_check_wheel(addon_dir)
build_and_check_wheel(addon_dir)
if dry_run:
_logger.info(f"DRY-RUN git push in {org}/{repo}@{target_branch}")
else:
Expand All @@ -174,11 +177,7 @@ def _merge_bot_merge_pr(org, repo, merge_bot_branch, cwd, dry_run=False):
["git", "push", "origin", f"{merge_bot_branch}:{target_branch}"], cwd=cwd
)
# build and publish wheel
if (
bumpversion_mode != "nobump"
and modified_installable_addon_dirs
and SIMPLE_INDEX_ROOT
):
if modified_installable_addon_dirs and SIMPLE_INDEX_ROOT:
for addon_dir in modified_installable_addon_dirs:
build_and_publish_wheel(addon_dir, SIMPLE_INDEX_ROOT, dry_run)
# TODO wlc unlock modified_addons
Expand Down