diff --git a/CHANGELOG.md b/CHANGELOG.md index e61d8eb6a72f..6e94d19c48ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## CHANGES IN DEVELOP + +IMPROVEMENTS: + +* initialize options for genesis with `--option` flag on `basecoin init` + ## 0.6.2 (July 27, 2017) IMPROVEMENTS: diff --git a/Makefile b/Makefile index 02cd94cc2c92..171180e39bc8 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ GOTOOLS = github.com/mitchellh/gox \ github.com/rigelrozanski/shelldown/cmd/shelldown TUTORIALS=$(shell find docs/guide -name "*md" -type f) -EXAMPLES := counter eyes basecoin +EXAMPLES := counter eyes basecoin INSTALL_EXAMPLES := $(addprefix install_,${EXAMPLES}) TEST_EXAMPLES := $(addprefix testex_,${EXAMPLES}) @@ -37,6 +37,7 @@ test_unit: @go test `glide novendor` test_cli: $(TEST_EXAMPLES) + ./tests/cli/init-server.sh # sudo apt-get install jq # wget "https://raw.githubusercontent.com/kward/shunit2/master/source/2.1/src/shunit2" diff --git a/server/commands/init.go b/server/commands/init.go index bb8617d080e9..96267dcc34eb 100644 --- a/server/commands/init.go +++ b/server/commands/init.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "os" + "strings" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -25,10 +26,12 @@ var InitCmd = &cobra.Command{ //nolint - flags var ( FlagChainID = "chain-id" //TODO group with other flags or remove? is this already a flag here? + FlagOption = "option" ) func init() { InitCmd.Flags().String(FlagChainID, "test_chain_id", "Chain ID") + InitCmd.Flags().StringSliceP(FlagOption, "p", []string{}, "Genesis option in the format /