• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2#
3# Copyright 2020 The ChromiumOS Authors
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# Based on the output of lucicfg, transforms the enum values to readable
8# strings.
9
10# Exit if any command fails.
11set -e
12
13# Path to the generated config protobuf.
14readonly output_dir=$1
15readonly config_path="${output_dir}/generated/config.jsonproto"
16
17# TODO(crbug.com/1073530): Ideally lucicfg's to_jsonpb could handle writing
18# JSON PB with enums serialized as ints. For now we do it with a python
19# helper. Note that we overwrite the input file so only the converted result
20# remains.
21config/payload_utils/convert_config_enums.py \
22  --input_config="${config_path}" \
23  --output_config="${config_path}"
24