blob: 650e3aa0ba40d7419247d109b8fe19e9dfe56044 [file] [log] [blame]
#!/bin/bash -e
# 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.
# Obtain the most recent proto descriptors from chromiumos/infra/proto protos.
# This is needed to work with these protos from *.star code.
echo "Generating proto descriptors..."
TNULL_DIR="$(dirname "$(realpath -e "${BASH_SOURCE[0]}")")"
cd ${TNULL_DIR}
./_generate_proto_descriptors.sh
echo "Generating metadata from descriptors..."
lucicfg generate main.star
echo "// 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.
package cmd
// This file is written automatically by generate_metadata.sh.
// DO NOT EDIT.
const configData = \`$(cat metadata/generated/config.cfg)\`" \
> src/tnull/cmd/config.go