Skip to content

Commit

Permalink
chore: release v0.18.5 (#1822)
Browse files Browse the repository at this point in the history
feat: improve cosmosclient & cosmosaccount, upgrade SDK
  • Loading branch information
ilgooz authored Nov 18, 2021
2 parents 174bd31 + a6dc3fa commit 8d31ca8
Show file tree
Hide file tree
Showing 48 changed files with 1,207 additions and 4,607 deletions.
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ go 1.16
require (
github.com/99designs/keyring v1.1.6
github.com/AlecAivazis/survey/v2 v2.1.1
github.com/Microsoft/hcsshim v0.9.1 // indirect
github.com/blang/semver v3.5.1+incompatible
github.com/briandowns/spinner v1.11.1
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/charmbracelet/glow v1.4.0
github.com/cosmos/cosmos-sdk v0.44.0
github.com/containerd/containerd v1.5.8 // indirect
github.com/cosmos/cosmos-sdk v0.44.3
github.com/cosmos/go-bip39 v1.0.0
github.com/dariubs/percent v0.0.0-20200128140941-b7801cf1c7e2
github.com/docker/docker v20.10.7+incompatible
github.com/emicklei/proto v1.9.0
github.com/fatih/color v1.10.0
github.com/fatih/color v1.12.0
github.com/ghodss/yaml v1.0.0
github.com/go-git/go-git/v5 v5.1.0
github.com/gobuffalo/genny v0.6.0
Expand All @@ -23,38 +24,37 @@ require (
github.com/gobuffalo/plush v3.8.3+incompatible
github.com/gobuffalo/plushgen v0.1.2
github.com/goccy/go-yaml v1.9.2
github.com/gogo/protobuf v1.3.3
github.com/google/go-github/v37 v37.0.0
github.com/gookit/color v1.2.7
github.com/gookit/color v1.4.2
github.com/gorilla/mux v1.8.0
github.com/gorilla/rpc v1.2.0
github.com/iancoleman/strcase v0.1.3
github.com/imdario/mergo v0.3.11
github.com/imdario/mergo v0.3.12
github.com/jpillora/chisel v1.7.3
github.com/kr/pretty v0.3.0 // indirect
github.com/manifoldco/promptui v0.8.0
github.com/mattn/go-zglob v0.0.3
github.com/olekukonko/tablewriter v0.0.5
github.com/moby/sys/mount v0.3.0 // indirect
github.com/otiai10/copy v1.6.0
github.com/pelletier/go-toml v1.9.3
github.com/pkg/errors v0.9.1
github.com/radovskyb/watcher v1.0.7
github.com/rdegges/go-ipify v0.0.0-20150526035502-2d94a6a86c40
github.com/rs/cors v1.7.0
github.com/spf13/cobra v1.1.3
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
github.com/tendermint/flutter v1.0.2
github.com/tendermint/spm v0.1.5
github.com/tendermint/spn v0.0.0-20210915093512-0d7e688be0fe
github.com/tendermint/tendermint v0.34.13
github.com/tendermint/spm v0.1.8
github.com/tendermint/tendermint v0.34.14
github.com/tendermint/vue v0.1.54
golang.org/x/mod v0.4.2
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83 // indirect
)

replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)
567 changes: 355 additions & 212 deletions go.sum

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions starport/cmd/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
flagAddressPrefix = "address-prefix"
flagPassphrase = "passphrase"
flagNonInteractive = "non-interactive"
flagKeyringBackend = "keyring-backend"
)

func NewAccount() *cobra.Command {
Expand Down Expand Up @@ -65,9 +66,9 @@ func flagSetKeyringBackend() *flag.FlagSet {
return fs
}

func getKeyringBackend(cmd *cobra.Command) string {
func getKeyringBackend(cmd *cobra.Command) cosmosaccount.KeyringBackend {
backend, _ := cmd.Flags().GetString(flagKeyringBackend)
return backend
return cosmosaccount.KeyringBackend(backend)
}

func flagSetAccountPrefixes() *flag.FlagSet {
Expand Down
4 changes: 3 additions & 1 deletion starport/cmd/account_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ func NewAccountCreate() *cobra.Command {
func accountCreateHandler(cmd *cobra.Command, args []string) error {
name := args[0]

ca, err := cosmosaccount.New(getKeyringBackend(cmd))
ca, err := cosmosaccount.New(
cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)),
)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion starport/cmd/account_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ func NewAccountDelete() *cobra.Command {
func accountDeleteHandler(cmd *cobra.Command, args []string) error {
name := args[0]

ca, err := cosmosaccount.New(getKeyringBackend(cmd))
ca, err := cosmosaccount.New(
cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)),
)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion starport/cmd/account_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ func accountExportHandler(cmd *cobra.Command, args []string) error {
return err
}

ca, err := cosmosaccount.New(getKeyringBackend(cmd))
ca, err := cosmosaccount.New(
cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)),
)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion starport/cmd/account_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ func accountImportHandler(cmd *cobra.Command, args []string) error {
secret = string(privKey)
}

ca, err := cosmosaccount.New(getKeyringBackend(cmd))
ca, err := cosmosaccount.New(
cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)),
)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion starport/cmd/account_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ func NewAccountList() *cobra.Command {
}

func accountListHandler(cmd *cobra.Command, args []string) error {
ca, err := cosmosaccount.New(getKeyringBackend(cmd))
ca, err := cosmosaccount.New(
cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)),
)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion starport/cmd/account_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ func NewAccountShow() *cobra.Command {
func accountShowHandler(cmd *cobra.Command, args []string) error {
name := args[0]

ca, err := cosmosaccount.New(getKeyringBackend(cmd))
ca, err := cosmosaccount.New(
cosmosaccount.WithKeyringBackend(getKeyringBackend(cmd)),
)
if err != nil {
return err
}
Expand Down
24 changes: 0 additions & 24 deletions starport/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ import (
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"github.com/tendermint/starport/starport/internal/version"
"github.com/tendermint/starport/starport/pkg/clispinner"
"github.com/tendermint/starport/starport/pkg/cosmosver"
"github.com/tendermint/starport/starport/pkg/events"
"github.com/tendermint/starport/starport/pkg/gitpod"
"github.com/tendermint/starport/starport/pkg/goenv"
"github.com/tendermint/starport/starport/pkg/xgenny"
"github.com/tendermint/starport/starport/services/chain"
"github.com/tendermint/starport/starport/services/networkbuilder"
"github.com/tendermint/starport/starport/services/scaffolder"
)

Expand Down Expand Up @@ -78,18 +75,6 @@ func logLevel(cmd *cobra.Command) chain.LogLvl {
return chain.LogRegular
}

func printEvents(bus events.Bus, s *clispinner.Spinner) {
for event := range bus {
if event.IsOngoing() {
s.SetText(event.Text())
s.Start()
} else {
s.Stop()
fmt.Printf("%s %s\n", color.New(color.FgGreen).SprintFunc()("✔"), event.Description)
}
}
}

func flagSetPath(cmd *cobra.Command) {
cmd.PersistentFlags().StringP(flagPath, "p", ".", "path of the app")
}
Expand Down Expand Up @@ -142,15 +127,6 @@ func newChainWithHomeFlags(cmd *cobra.Command, chainOption ...chain.Option) (*ch
return chain.New(absPath, chainOption...)
}

func initOptionWithHomeFlag(cmd *cobra.Command, initOptions []networkbuilder.InitOption) []networkbuilder.InitOption {
// Check if custom home is provided
if home := getHomeFlag(cmd); home != "" {
initOptions = append(initOptions, networkbuilder.InitializationHomePath(home))
}

return initOptions
}

var (
modifyPrefix = color.New(color.FgMagenta).SprintFunc()("modify ")
createPrefix = color.New(color.FgGreen).SprintFunc()("create ")
Expand Down
Loading

0 comments on commit 8d31ca8

Please sign in to comment.