Merge PR #3426: Various changes to version cmd, revert those which previously broke ABI

* version prints out short info by default

Handle -o json, add --long flag to print full version info.

* Add distclean target to Makefile

* Update PENDING.md

* Add missing targets in .PHONY
This commit is contained in:
Alessio Treglia
2019-01-29 23:25:43 +01:00
committed by Christopher Goes
parent 172a4510c7
commit 0ed6de0cbd
6 changed files with 63 additions and 17 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router) {
// cli version REST handler endpoint
func CLIVersionRequestHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(fmt.Sprintf("{\"version\": \"%s\"}", version.GetVersion())))
w.Write([]byte(fmt.Sprintf("{\"version\": \"%s\"}", version.Version)))
}
// connected node version REST handler endpoint