blob: ce50b09e335de28339db3a2ddc2f07b52d059893 [file] [log] [blame]
Marcel van Lohuizenf8132852019-04-26 12:16:18 +02001// Copyright 2018 The CUE Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Marcel van Lohuizenf8132852019-04-26 12:16:18 +020015package tool
16
17// A Command specifies a user-defined command.
18Command: {
19 //
20 // Example:
21 // mycmd [-n] names
22 usage?: string
23
24 // short is short description of what the command does.
25 short?: string
26
27 // long is a longer description that spans multiple lines and
28 // likely contain examples of usage of the command.
29 long?: string
30
Marcel van Lohuizen928bfa32019-04-26 12:16:18 +020031 // TODO: define flags and environment variables.
Marcel van Lohuizenf8132852019-04-26 12:16:18 +020032
33 // tasks specifies the list of things to do to run command. Tasks are
34 // typically underspecified and completed by the particular internal
35 // handler that is running them. Task de
36 tasks <name>: Task
Marcel van Lohuizenf8132852019-04-26 12:16:18 +020037}
38
Marcel van Lohuizen928bfa32019-04-26 12:16:18 +020039// A Task defines a step in the execution of a command.
Marcel van Lohuizenf8132852019-04-26 12:16:18 +020040Task: {
Marcel van Lohuizen928bfa32019-04-26 12:16:18 +020041 // kind indicates the operation to run. It must be of the form
42 // packagePath.Operation.
Marcel van Lohuizenf8132852019-04-26 12:16:18 +020043 kind: =~#"\."#
44}