blob: 650e3aa0ba40d7419247d109b8fe19e9dfe56044 [file] [log] [blame]
Jacob Kopczynskic6817852020-06-09 14:17:55 -07001#!/bin/bash -e
2# Copyright 2020 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6# Obtain the most recent proto descriptors from chromiumos/infra/proto protos.
7# This is needed to work with these protos from *.star code.
8
9echo "Generating proto descriptors..."
Sean Abraham7edcef32020-10-14 11:14:00 -060010TNULL_DIR="$(dirname "$(realpath -e "${BASH_SOURCE[0]}")")"
11cd ${TNULL_DIR}
Jacob Kopczynski64f705e2020-06-21 13:37:23 -070012./_generate_proto_descriptors.sh
Jacob Kopczynskic6817852020-06-09 14:17:55 -070013echo "Generating metadata from descriptors..."
14lucicfg generate main.star
Sean Abraham22acb0c2020-11-24 13:47:25 -070015
16echo "// Copyright 2020 The Chromium OS Authors. All rights reserved.
17// Use of this source code is governed by a BSD-style license that can be
18// found in the LICENSE file.
19
20package cmd
21
22// This file is written automatically by generate_metadata.sh.
23// DO NOT EDIT.
24
25const configData = \`$(cat metadata/generated/config.cfg)\`" \
26 > src/tnull/cmd/config.go