2020-11-30 05:16:25 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2021-11-02 03:08:41 +00:00
|
|
|
"github.com/rs/zerolog/log"
|
2020-11-30 05:16:25 +00:00
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
var Env = &cli.Command{
|
|
|
|
Name: "env",
|
|
|
|
Usage: "Show tmpl environment variables",
|
|
|
|
Description: "Show tmpl environment variables and their configuration",
|
|
|
|
Action: runEnv,
|
|
|
|
}
|
|
|
|
|
|
|
|
func runEnv(_ *cli.Context) error {
|
|
|
|
|
|
|
|
// Source
|
2021-11-02 03:08:41 +00:00
|
|
|
log.Info().Str("TMPL_SOURCE", os.Getenv("TMPL_SOURCE")).Msg("")
|
2020-11-30 05:16:25 +00:00
|
|
|
|
|
|
|
// Registry Path
|
2021-11-02 03:08:41 +00:00
|
|
|
log.Info().Str("TMPL_REGISTRY", os.Getenv("TMPL_REGISTRY")).Msg("")
|
2020-11-30 05:16:25 +00:00
|
|
|
|
|
|
|
// Branch
|
2021-11-02 03:08:41 +00:00
|
|
|
log.Info().Str("TMPL_BRANCH", os.Getenv("TMPL_BRANCH")).Msg("")
|
2020-11-30 05:16:25 +00:00
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-11-02 03:08:41 +00:00
|
|
|
|