Skip to content

Commit

Permalink
Merge branch 'ignite:main' into add-feeabs
Browse files Browse the repository at this point in the history
  • Loading branch information
trungnt1811 authored Jul 18, 2024
2 parents 87915fd + 42860cc commit 9f10512
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
9 changes: 4 additions & 5 deletions ignite/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package ignitecmd

import (
"context"
"fmt"
"os"
"path/filepath"
"slices"
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -240,20 +239,20 @@ 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)
if err != nil || !isAvailable {
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) {
Expand Down
2 changes: 1 addition & 1 deletion ignite/cmd/plugin_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
1 change: 1 addition & 0 deletions ignite/templates/app/files-consumer/app/app.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ignite/templates/app/files-minimal/app/app.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ignite/templates/app/files/app/app.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"

clienthelpers "cosmossdk.io/client/v2/helpers"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

"<%= ModulePath %>/app"
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/app/files/go.mod.plush
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f10512

Please sign in to comment.