blob: 27e25c89a23eb50bc311a8fa20f834d36e0958f6 [file] [log] [blame]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Set root for generated files.
config_dir = "metadata/generated",
# Load and register protos.
load("@stdlib//internal/", "wellknown_descpb")
protos = proto.new_descriptor_set(
name = "chromiumos",
blob = io.read_file("//metadata/proto/descpb.bin"),
deps = [wellknown_descpb],
# Load test metadata.
load("//metadata/", "METADATA")
# Generate metadata proto output.
def _generate(config):
Serializes a proto message to files.
A text proto and binary proto are written.
def _generate_impl(ctx):
ctx.output["config.cfg"] = proto.to_jsonpb(config)
ctx.output["config.binaryproto"] = proto.to_wirepb(config)
lucicfg.generator(impl = _generate_impl)
def generate():