From ab6915303766e5bdd3d2a3c381512417e462c863 Mon Sep 17 00:00:00 2001 From: Marko Date: Fri, 19 Feb 2021 13:05:42 +0000 Subject: [PATCH] docs: how to add tm version to RPC (#6151) ## Description Add docs on how to get tendermint version into RPC version outputs --- docs/tendermint-core/rpc.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/tendermint-core/rpc.md b/docs/tendermint-core/rpc.md index 62c5b01dd..c7cfee49b 100644 --- a/docs/tendermint-core/rpc.md +++ b/docs/tendermint-core/rpc.md @@ -9,3 +9,19 @@ The RPC documentation is hosted here: - [https://docs.tendermint.com/master/rpc/](https://docs.tendermint.com/master/rpc/) To update the documentation, edit the relevant `godoc` comments in the [rpc/core directory](https://github.com/tendermint/tendermint/tree/master/rpc/core). + +If you are using Tendermint in-process, you will need to set the version to be displayed in the RPC. + +If you are using a makefile with your go project, this can be done by using sed and `ldflags`. + +Example: + +``` +VERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::') +LD_FLAGS = -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION) + +install: + @echo "Installing the brr machine" + @go install -mod=readonly -ldflags "$(LD_FLAGS)" ./cmd/ +.PHONY: install +```