// Copyright 2023 The Pigweed Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
syntax = "proto3";

package recipe_modules.pigweed.bazel;

message Options {
  // Path to a CIPD JSON file that specifies the version of Bazel to use,
  // relative to the checkout root. If not set Bazelisk is assumed.
  string cipd_json_path = 1;

  // Whether to use Bazelisk to get Bazel. Defaults to 'latest'.
  string bazelisk_version = 2;

  // Bazel invocations to peform.
  repeated BazelInvocation invocations = 3;

  // File containing the definitions of presubmit "programs". Defaults to
  // "pigweed.json".
  string config_path = 4;

  // Names of presubmit "programs" to execute from the file at config_path.
  repeated string program = 5;
}

message BazelInvocation {
  // Arguments to pass to bazel. Example: ['test', '...'].
  repeated string args = 1;
}
