go.fuchsia.dev/infra@v0.0.0-20240507153436-9b593402251b/cmd/roller-configurator/main.go (about)

     1  // Copyright 2023 The Fuchsia Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style license that can be
     3  // found in the LICENSE file.
     4  
     5  package main
     6  
     7  import (
     8  	"log"
     9  	"os"
    10  
    11  	"github.com/maruel/subcommands"
    12  	"go.chromium.org/luci/client/versioncli"
    13  )
    14  
    15  const version = "0.0.1"
    16  
    17  func getApplication() *subcommands.DefaultApplication {
    18  	return &subcommands.DefaultApplication{
    19  		Name:  "roller-configurator",
    20  		Title: "Tool to maintain and deploy auto-roller definitions",
    21  		Commands: []*subcommands.Command{
    22  			cmdValidate(),
    23  			cmdResolve(),
    24  			versioncli.CmdVersion(version),
    25  			subcommands.CmdHelp,
    26  		},
    27  	}
    28  }
    29  
    30  func main() {
    31  	log.SetFlags(log.Lmicroseconds)
    32  	app := getApplication()
    33  	os.Exit(subcommands.Run(app, nil))
    34  }