Using cosmos-sdk version from the library itself

This commit is contained in:
Sridhar Ganesan 2018-07-16 23:58:40 +02:00
parent 1e16ba370f
commit a463089df1
2 changed files with 6 additions and 1 deletions

View File

@ -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 {

View File

@ -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]]