diff --git a/README.md b/README.md index 5ece853..7180dc5 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,15 @@ Blender developers with commit access can start builds by typing commands in comments on projects.blender.org. -* `@blender-bot build [platform]`: build current pull request. A notification about the build progress / result is shown in the list of commits that make up this pull request. +* `@blender-bot build [config] [platform]`: build current pull request. A notification about the build progress / result is shown in the list of commits that make up this pull request. * `@blender-bot package [platform]`: build current pull request and make package for download. The bot will post the link in a comment on the pull request. * `@blender-bot build-branch branch [platform]`: build the given branch. The bot will post a link to the build in a comment on the issue / pull request. * `@blender-bot package-branch branch [platform]`: build branch and make package for download. The bot will post the link in a comment on the issue / pull request. +`[config]` is optional. Possible values: +* `release` (default) +* `debug`: Builds in debug mode + `[platform]` is optional, and used to build for just one platform. Possible values: * `windows` `macos` `linux` (for brevity) * `windows-amd64` `macos-x86_64` `macos-arm64` `linux-x86_64` (to be specific) diff --git a/commands.py b/commands.py index adf3e5a..552bf36 100644 --- a/commands.py +++ b/commands.py @@ -118,7 +118,7 @@ def get_pull_commit_hash(repo: str, pull_id: str): return result['head']['sha'] -def build(repo: str, reply_url: str, html_url: str, build_type: str, build_id: str, username: str, package: bool, platform_args: Sequence[str]): +def build(repo: str, reply_url: str, html_url: str, build_type: str, build_id: str, build_config: str, username: str, package: bool, platform_args: Sequence[str]): """ Build blender on the buildbot. """ @@ -132,7 +132,7 @@ def build(repo: str, reply_url: str, html_url: str, build_type: str, build_id: s params = {"needs_package_delivery": package, "platform_architectures": platforms, - "build_configuration": "release"} + "build_configuration": build_config} elif repo == "blender/blender-manual": coordinator_prefix = "vexp-doc-manual" @@ -234,13 +234,16 @@ def comment_event(data: Dict[str, Any]): command = tokens[0] args = tokens[1:] if command == "build" and is_pull: - build(repo, reply_url, html_url, 'patch_id', issue_number, username, False, args) + if len(args) >= 1 and args[0] in {"release", "debug"}: + build(repo, reply_url, html_url, 'patch_id', args[0], issue_number, username, False, args[1:]) + else: + build(repo, reply_url, html_url, 'patch_id', "release", issue_number, username, False, args) elif command == "build-branch" and len(args) >= 1: - build(repo, reply_url, html_url, 'override_branch_id', args[0], username, False, args[1:]) + build(repo, reply_url, html_url, 'override_branch_id', "release", args[0], username, False, args[1:]) elif command == "package" and is_pull: - build(repo, reply_url, html_url, 'patch_id', issue_number, username, True, args) + build(repo, reply_url, html_url, 'patch_id', "release", issue_number, username, True, args) elif command == "package-branch" and len(args) >= 1: - build(repo, reply_url, html_url, 'override_branch_id', args[0], username, True, args[1:]) + build(repo, reply_url, html_url, 'override_branch_id', "release", args[0], username, True, args[1:]) elif command == "ping": post_comment(reply_url, "pong") else: