Created
October 15, 2017 16:46
-
-
Save excavador/4ad9899345f7dec3ec4a47ef8b23b056 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _clickhouse_export_impl(ctx): | |
print(ctx.file.server, dir(ctx.attr.server), type(ctx.attr.server)) | |
server_source = ctx.attr.server.files.to_list()[0] | |
client_source = ctx.attr.client.files.to_list()[0] | |
server_result = ctx.outputs.server | |
client_result = ctx.outputs.client | |
... | |
_clickhouse_export = rule( | |
implementation = _clickhouse_export_impl, | |
attrs = { | |
"server": attr.label(mandatory=True), | |
"client": attr.label(mandatory=True), | |
"version": attr.string(mandatory=True), | |
}, | |
outputs = { | |
"server": "%{name}-server", | |
"client": "%{name}-client", | |
}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment