diff --git a/ignite/cmd/cmd.go b/ignite/cmd/cmd.go index 73d1b76cd9..c7cfdcdd28 100644 --- a/ignite/cmd/cmd.go +++ b/ignite/cmd/cmd.go @@ -2,7 +2,6 @@ package ignitecmd import ( "context" - "fmt" "os" "path/filepath" "slices" @@ -73,7 +72,7 @@ To get started, create a blockchain: // Check for new versions only when shell completion scripts are not being // generated to avoid invalid output to stdout when a new version is available if cmd.Use != "completion" || !strings.HasPrefix(cmd.Use, cobra.ShellCompRequestCmd) { - checkNewVersion(cmd.Context()) + checkNewVersion(cmd) } return goenv.ConfigurePath() @@ -240,12 +239,12 @@ func deprecated() []*cobra.Command { } } -func checkNewVersion(ctx context.Context) { +func checkNewVersion(cmd *cobra.Command) { if gitpod.IsOnGitpod() { return } - ctx, cancel := context.WithTimeout(ctx, checkVersionTimeout) + ctx, cancel := context.WithTimeout(cmd.Context(), checkVersionTimeout) defer cancel() isAvailable, next, err := version.CheckNext(ctx) @@ -253,7 +252,7 @@ func checkNewVersion(ctx context.Context) { return } - fmt.Printf("⬆️ Ignite CLI %s is available! To upgrade: https://docs.ignite.com/welcome/install#upgrade", next) + cmd.Printf("⬆️ Ignite CLI %s is available! To upgrade: https://docs.ignite.com/welcome/install#upgrade (or use snap or homebrew)\n\n", next) } func newCache(cmd *cobra.Command) (cache.Storage, error) { diff --git a/ignite/cmd/plugin_default.go b/ignite/cmd/plugin_default.go index 798a995610..3360575625 100644 --- a/ignite/cmd/plugin_default.go +++ b/ignite/cmd/plugin_default.go @@ -18,7 +18,7 @@ type defaultPlugin struct { const ( PluginNetworkVersion = "v0.2.2" PluginNetworkPath = "github.com/ignite/cli-plugin-network@" + PluginNetworkVersion - PluginRelayerVersion = "hermes/v0.2.2" + PluginRelayerVersion = "hermes/v0.2.4" PluginRelayerPath = "github.com/ignite/apps/hermes@" + PluginRelayerVersion ) diff --git a/ignite/templates/app/files-consumer/app/app.go.plush b/ignite/templates/app/files-consumer/app/app.go.plush index cecb2bf086..d2e994bd99 100644 --- a/ignite/templates/app/files-consumer/app/app.go.plush +++ b/ignite/templates/app/files-consumer/app/app.go.plush @@ -135,6 +135,7 @@ type App struct { func init() { var err error + clienthelpers.EnvPrefix = Name DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory("."+Name) if err != nil { panic(err) diff --git a/ignite/templates/app/files-minimal/app/app.go.plush b/ignite/templates/app/files-minimal/app/app.go.plush index 04575ece5d..a663f01fa8 100644 --- a/ignite/templates/app/files-minimal/app/app.go.plush +++ b/ignite/templates/app/files-minimal/app/app.go.plush @@ -79,6 +79,7 @@ type App struct { func init() { var err error + clienthelpers.EnvPrefix = Name DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory("."+Name) if err != nil { panic(err) diff --git a/ignite/templates/app/files/app/app.go.plush b/ignite/templates/app/files/app/app.go.plush index 68b0799eeb..504a3b392f 100644 --- a/ignite/templates/app/files/app/app.go.plush +++ b/ignite/templates/app/files/app/app.go.plush @@ -146,6 +146,7 @@ type App struct { func init() { var err error + clienthelpers.EnvPrefix = Name DefaultNodeHome, err = clienthelpers.GetNodeHomeDirectory("."+Name) if err != nil { panic(err) diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/main.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/main.go.plush index b151788080..2592235774 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/main.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/main.go.plush @@ -4,6 +4,7 @@ import ( "fmt" "os" + clienthelpers "cosmossdk.io/client/v2/helpers" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "<%= ModulePath %>/app" @@ -12,7 +13,7 @@ import ( func main() { rootCmd := cmd.NewRootCmd() - if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { + if err := svrcmd.Execute(rootCmd, clienthelpers.EnvPrefix, app.DefaultNodeHome); err != nil { fmt.Fprintln(rootCmd.OutOrStderr(), err) os.Exit(1) } diff --git a/ignite/templates/app/files/go.mod.plush b/ignite/templates/app/files/go.mod.plush index 26aa9b2471..4670caedd2 100644 --- a/ignite/templates/app/files/go.mod.plush +++ b/ignite/templates/app/files/go.mod.plush @@ -11,7 +11,7 @@ replace ( require ( cosmossdk.io/api v0.7.5 - cosmossdk.io/client/v2 v2.0.0-beta.3 + cosmossdk.io/client/v2 v2.0.0-beta.4 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.11.0 cosmossdk.io/depinject v1.0.0-alpha.4