Set different dirs for coral binary

This commit is contained in:
Ethan Frey
2020-07-27 11:02:02 +02:00
parent 2d04c3c75c
commit c3fe4d83b9
2 changed files with 8 additions and 2 deletions

View File

@@ -65,6 +65,8 @@ coral_ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=coral \
-X github.com/cosmos/cosmos-sdk/version.ClientName=coral \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X github.com/CosmWasm/wasmd/app.CLIDir=.coral \
-X github.com/CosmWasm/wasmd/app.NodeDir=.corald \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)"
coral_ldflags += $(LDFLAGS)

View File

@@ -40,11 +40,15 @@ import (
const appName = "WasmApp"
var (
// We pull these out so we can set them with LDFLAGS in the Makefile
CLIDir = ".wasmcli"
NodeDir = ".wasmd"
// DefaultCLIHome default home directories for wasmcli
DefaultCLIHome = os.ExpandEnv("$HOME/.wasmcli")
DefaultCLIHome = os.ExpandEnv("$HOME/") + CLIDir
// DefaultNodeHome default home directories for wasmd
DefaultNodeHome = os.ExpandEnv("$HOME/.wasmd")
DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir
// ModuleBasics The module BasicManager is in charge of setting up basic,
// non-dependant module elements, such as codec registration