Using cosmos-sdk version from the library itself
This commit is contained in:
parent
1e16ba370f
commit
a463089df1
|
@ -9,6 +9,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/version"
|
||||
"github.com/gobuffalo/packr"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -59,6 +60,10 @@ var initCmd = &cobra.Command{
|
|||
fmt.Println("Creating file: " + actualPath)
|
||||
contents := box.String(path)
|
||||
contents = replacer.Replace(contents)
|
||||
if actualPath == "Gopkg.toml" {
|
||||
versionReplacer := strings.NewReplacer("_COSMOS_VERSION_", version.Version)
|
||||
contents = versionReplacer.Replace(contents)
|
||||
}
|
||||
lastIndex := strings.LastIndex(actualPath, string(os.PathSeparator))
|
||||
rootDir := ""
|
||||
if lastIndex != -1 {
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
name = "github.com/tendermint/go-wire"
|
||||
|
||||
[[constraint]]
|
||||
version = "~0.22.0"
|
||||
version = "~_COSMOS_VERSION_"
|
||||
name = "github.com/cosmos/cosmos-sdk"
|
||||
|
||||
[[override]]
|
||||
|
|
Loading…
Reference in New Issue