Skip to content

Commit

Permalink
verbose to int, changes from generator fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm committed Oct 17, 2020
1 parent 6af87cd commit 82a1860
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .hof/shadow/Cli/cmd/hof/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func init() {
RootCmd.PersistentFlags().BoolVarP(&(flags.RootPflags.Simplify), "simplify", "S", false, "simplify output")
RootCmd.PersistentFlags().BoolVarP(&(flags.RootPflags.Trace), "trace", "", false, "trace cue computation")
RootCmd.PersistentFlags().BoolVarP(&(flags.RootPflags.Strict), "strict", "", false, "report errors for lossy mappings")
RootCmd.PersistentFlags().StringVarP(&(flags.RootPflags.Verbose), "verbose", "v", "", "set the verbosity of output")
RootCmd.PersistentFlags().IntVarP(&(flags.RootPflags.Verbose), "verbose", "v", 0, "set the verbosity of output")
RootCmd.PersistentFlags().BoolVarP(&(flags.RootPflags.Quiet), "quiet", "q", false, "turn off output and assume defaults at prompts")
RootCmd.PersistentFlags().StringVarP(&(flags.RootPflags.ImpersonateAccount), "impersonate-account", "", "", "account to impersonate for this hof execution")
RootCmd.PersistentFlags().StringVarP(&(flags.RootPflags.TraceToken), "trace-token", "T", "", "used to help debug issues")
Expand Down
2 changes: 1 addition & 1 deletion .hof/shadow/Cli/cmd/hof/flags/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type RootPflagpole struct {
Simplify bool
Trace bool
Strict bool
Verbose string
Verbose int
Quiet bool
ImpersonateAccount string
TraceToken string
Expand Down
2 changes: 1 addition & 1 deletion cmd/hof/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func init() {
RootCmd.PersistentFlags().BoolVarP(&(flags.RootPflags.Simplify), "simplify", "S", false, "simplify output")
RootCmd.PersistentFlags().BoolVarP(&(flags.RootPflags.Trace), "trace", "", false, "trace cue computation")
RootCmd.PersistentFlags().BoolVarP(&(flags.RootPflags.Strict), "strict", "", false, "report errors for lossy mappings")
RootCmd.PersistentFlags().StringVarP(&(flags.RootPflags.Verbose), "verbose", "v", "", "set the verbosity of output")
RootCmd.PersistentFlags().IntVarP(&(flags.RootPflags.Verbose), "verbose", "v", 0, "set the verbosity of output")
RootCmd.PersistentFlags().BoolVarP(&(flags.RootPflags.Quiet), "quiet", "q", false, "turn off output and assume defaults at prompts")
RootCmd.PersistentFlags().StringVarP(&(flags.RootPflags.ImpersonateAccount), "impersonate-account", "", "", "account to impersonate for this hof execution")
RootCmd.PersistentFlags().StringVarP(&(flags.RootPflags.TraceToken), "trace-token", "T", "", "used to help debug issues")
Expand Down
2 changes: 1 addition & 1 deletion cmd/hof/flags/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type RootPflagpole struct {
Simplify bool
Trace bool
Strict bool
Verbose string
Verbose int
Quiet bool
ImpersonateAccount string
TraceToken string
Expand Down
2 changes: 1 addition & 1 deletion design/cli/pflags.cue
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ import (
Name: "verbose"
Long: "verbose"
Short: "v"
Type: "string"
Type: "int"
Default: ""
Help: "set the verbosity of output"
},
Expand Down
14 changes: 6 additions & 8 deletions design/config/main.cue
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
package config

import (
// hof "github.com/hofstadter-io/hof/schema"

"github.com/hofstadter-io/hofmod-cuefig/schema"
)

// Local context
#HofContext: schema._Config & {
#HofContext: schema.#Config & {
Name: "context"
Entrypoint: ".hofctx.cue"
ConfigSchema: #ContextSchema
}

// Local config
#HofConfig: schema._Config & {
#HofConfig: schema.#Config & {
Name: "config"
Entrypoint: ".hofcfg.cue"
ConfigSchema: #WorkspaceSchema
}

// Local secret
#HofSecret: schema._Config & {
#HofSecret: schema.#Config & {
Sensative: true
Name: "secret"
Entrypoint: ".hofshh.cue"
ConfigSchema: #SecretSchema
}

// (user/app config dir) context
#HofUserContext: schema._Config & {
#HofUserContext: schema.#Config & {
Name: "hofctx"
Entrypoint: ".hofctx.cue"
Workpath: "hof"
Expand All @@ -38,7 +36,7 @@ import (
}

// (user/app config dir) config
#HofUserConfig: schema._Config & {
#HofUserConfig: schema.#Config & {
Name: "hofcfg"
Entrypoint: ".hofcfg.cue"
Workpath: "hof"
Expand All @@ -47,7 +45,7 @@ import (
}

// (user/app config dir) secret
#HofUserSecret: schema._Config & {
#HofUserSecret: schema.#Config & {
Sensative: true
Name: "hofshh"
Entrypoint: ".hofshh.cue"
Expand Down
12 changes: 6 additions & 6 deletions hof.cue
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ Cli: g_cli.#HofGenerator & {
}

Context: _ @gen(cuefig,context,ctx)
Context: g_cuefig._HofGenerator & {
Context: g_cuefig.#HofGenerator & {
Outdir: "gen/"
Config: d_cfg.#HofContext
}

Config: _ @gen(cuefig,config,cfg)
Config: g_cuefig._HofGenerator & {
Config: g_cuefig.#HofGenerator & {
Outdir: "gen/"
Config: d_cfg.#HofConfig
}

Secret: _ @gen(cuefig,secret,shh,ssh)
Secret: g_cuefig._HofGenerator & {
Secret: g_cuefig.#HofGenerator & {
Outdir: "gen/"
Config: d_cfg.#HofSecret
}

UserContext: _ @gen(cuefig,ucontext,uctx)
UserContext: g_cuefig._HofGenerator & {
UserContext: g_cuefig.#HofGenerator & {
Outdir: "gen/"
Config: d_cfg.#HofUserContext
}

UserConfig: _ @gen(cuefig,uconfig,ucfg)
UserConfig: g_cuefig._HofGenerator & {
UserConfig: g_cuefig.#HofGenerator & {
Outdir: "gen/"
Config: d_cfg.#HofUserConfig
}

UserSecret: _ @gen(cuefig,usecret,ushh,ussh)
UserSecret: g_cuefig._HofGenerator & {
UserSecret: g_cuefig.#HofGenerator & {
Outdir: "gen/"
Config: d_cfg.#HofUserSecret
}

0 comments on commit 82a1860

Please sign in to comment.