1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
11 "github.com/spf13/cobra"
12 "github.com/spf13/viper"
20 Endpoint string `json:"endpoint"` // https://dev-dev.arvados.org
21 Apikey string `json:"apikey"` // abcde...
24 func loadConfig() config {
28 Viper.SetEnvPrefix("redmine") // will be uppercased automatically
29 Viper.BindEnv("endpoint")
30 Viper.BindEnv("apikey")
32 c.Endpoint = Viper.GetString("endpoint")
33 c.Apikey = Viper.GetString("apikey")
39 rootCmd.PersistentFlags().StringP("output", "o", "", "Output format. Empty for human-readable, 'json' or 'json-line'")
40 rootCmd.PersistentFlags().BoolP("help", "h", false, "Print help")
41 rootCmd.PersistentFlags().BoolP("debug", "d", false, "Print debug output")
44 var rootCmd = &cobra.Command{
46 Short: "art - Arvados Release Tool",
48 art (Arvados Release Tool) supports the Arvados development process
50 https://git.arvados.org/arvados-dev.git/cmd/art`,
51 PreRunE: func(cmd *cobra.Command, args []string) error {
58 if err := rootCmd.Execute(); err != nil {
59 fmt.Fprintln(os.Stderr, err)