Browse Source

UX: version configuration (#5740)

## Description

- when not on a tag `tendermint version` will return "unreleased-`branchName`-`commitHash`"

Closes: #XXX
pull/5743/head
Marko 4 years ago
committed by GitHub
parent
commit
8a80b97865
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions
  1. +8
    -1
      Makefile
  2. +5
    -3
      docs/tendermint-core/running-in-production.md

+ 8
- 1
Makefile View File

@ -4,7 +4,14 @@ PACKAGES=$(shell go list ./...)
BUILDDIR ?= $(CURDIR)/build
BUILD_TAGS?=tendermint
VERSION := $(shell git describe --always)
# If building a release, please checkout the version tag to get the correct version setting
ifneq ($(shell git branch --show-current),)
VERSION := unreleased-$(shell git branch --show-current)-$(shell git rev-parse HEAD)
else
VERSION := $(shell git describe)
endif
LD_FLAGS = -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION)
BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)"
HTTPS_GIT := https://github.com/tendermint/tendermint.git


+ 5
- 3
docs/tendermint-core/running-in-production.md View File

@ -4,6 +4,8 @@ order: 4
# Running in production
If you are building Tendermint from source for use in production, make sure to check out an appropriate Git tag instead of a branch.
## Database
By default, Tendermint uses the `syndtr/goleveldb` package for its in-process
@ -220,8 +222,8 @@ Recovering from data corruption can be hard and time-consuming. Here are two app
./scripts/wal2json/wal2json "$TMHOME/data/cs.wal/wal" > /tmp/corrupted_wal
```
3) Search for a "CORRUPTED MESSAGE" line.
4) By looking at the previous message and the message after the corrupted one
3) Search for a "CORRUPTED MESSAGE" line.
4) By looking at the previous message and the message after the corrupted one
and looking at the logs, try to rebuild the message. If the consequent
messages are marked as corrupted too (this may happen if length header
got corrupted or some writes did not make it to the WAL ~ truncation),
@ -232,7 +234,7 @@ Recovering from data corruption can be hard and time-consuming. Here are two app
$EDITOR /tmp/corrupted_wal
```
5) After editing, convert this file back into binary form by running:
5) After editing, convert this file back into binary form by running:
```sh
./scripts/json2wal/json2wal /tmp/corrupted_wal $TMHOME/data/cs.wal/wal


Loading…
Cancel
Save