Skip to content
Merged
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
4 changes: 3 additions & 1 deletion rules/subrepo_rules.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def local_repository(name:str, path:str):
path = path,
)

def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build", hashes:list=[]):
def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build", hashes:list=[], labels:list=[]):
"""Defines a please plugin to use from the configured plugin repositories. See
https://please.build/config.html#please.pluginrepositories for more information.

Expand All @@ -328,6 +328,7 @@ def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build"
plugin (str): The name of the plugin. Defaults to the name of this rule.
owner (str): The owner of the plugin to be passed to the template URLS.
hashes (list): A list of valid hashes for the downloaded archive file.
labels (list): Any labels which are applied to the build target.
"""
plugin = plugin or name
urls = [url.format(owner=owner, revision=revision, plugin=plugin) for url in CONFIG.PLUGIN_REPOS]
Expand All @@ -338,6 +339,7 @@ def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build"
url = urls,
out = name + '_' + basename(urls[0]),
hashes = hashes,
labels = labels,
)
extract_rule = build_rule(
name = name,
Expand Down
Loading