From 263ba5ce3f8d6b41327beb521d4112906841e257 Mon Sep 17 00:00:00 2001 From: Alex Yu Date: Fri, 12 Apr 2019 12:56:49 +0300 Subject: [PATCH] Changes: 1. skywire-node: removed command 'version' instead of this used builtin cobra ability '--version' 2. Makefile: updated for changes in skywire-cli --- Makefile | 2 +- cmd/skywire-node/commands/root.go | 1 + cmd/skywire-node/commands/version.go | 21 --------------------- 3 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 cmd/skywire-node/commands/version.go diff --git a/Makefile b/Makefile index 6a1f78bdb8..4a6182572f 100644 --- a/Makefile +++ b/Makefile @@ -108,7 +108,7 @@ docker-bin: ## Build `skywire-node`, `skywire-cli`, `manager-node`, `therealssh- ${DOCKER_OPTS} go build -o ./node/skywire-node ./cmd/skywire-node docker-volume: docker-apps docker-bin bin ## Prepare docker volume for dockerized skywire-node - ./skywire-cli config ./node/skywire.json + ./skywire-cli node gen-config -o ./node/skywire.json -r docker-run: docker-clean docker-image docker-network docker-volume ## Run dockerized skywire-node ${DOCKER_NODE} in image ${DOCKER_IMAGE} with network ${DOCKER_NETWORK} docker run -it -v $(shell pwd)/node:/sky --network=${DOCKER_NETWORK} \ diff --git a/cmd/skywire-node/commands/root.go b/cmd/skywire-node/commands/root.go index 6c00443052..b7e6403647 100644 --- a/cmd/skywire-node/commands/root.go +++ b/cmd/skywire-node/commands/root.go @@ -65,6 +65,7 @@ var rootCmd = &cobra.Command{ } } }, + Version: node.Version, } // Execute executes root CLI command. diff --git a/cmd/skywire-node/commands/version.go b/cmd/skywire-node/commands/version.go deleted file mode 100644 index 660408ac9a..0000000000 --- a/cmd/skywire-node/commands/version.go +++ /dev/null @@ -1,21 +0,0 @@ -package commands - -import ( - "fmt" - - "github.com/spf13/cobra" - - "github.com/skycoin/skywire/pkg/node" -) - -func init() { - rootCmd.AddCommand(versionCmd) -} - -var versionCmd = &cobra.Command{ - Use: "version", - Short: "Prints the skywire-node version", - Run: func(_ *cobra.Command, _ []string) { - fmt.Println(node.Version) - }, -}