Add version commit string

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-12-11 23:00:39 +01:00
parent f77fe9ed89
commit 9589fc0762
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
9 changed files with 13 additions and 8 deletions

View File

@ -14,6 +14,7 @@ MODULES:=
CLEAN:=
BINS:=
GOFLAGS+=-ldflags="-X "github.com/filecoin-project/lotus/build".CurrentCommit=-$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)"
## FFI
@ -47,7 +48,7 @@ CLEAN+=build/.update-modules
deps: $(BUILD_DEPS)
.PHONY: deps
debug: GOFLAGS=-tags=debug
debug: GOFLAGS+=-tags=debug
debug: lotus lotus-storage-miner lotus-seal-worker lotus-seed
lotus: $(BUILD_DEPS)

View File

@ -1,8 +1,12 @@
package build
var CurrentCommit string
// Version is the local build version, set by build system
const Version = "0.1.0"
var UserVersion = Version + CurrentCommit
// APIVersion is a hex semver version of the rpc api exposed
//
// M M P

View File

@ -59,7 +59,7 @@ func main() {
app := &cli.App{
Name: "lotus-bench",
Usage: "Benchmark performance of lotus on your hardware",
Version: build.Version,
Version: build.UserVersion,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "storage-dir",

View File

@ -28,7 +28,7 @@ func main() {
app := &cli.App{
Name: "lotus-chainwatch",
Usage: "Devnet token distribution utility",
Version: build.Version,
Version: build.UserVersion,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "repo",

View File

@ -40,7 +40,7 @@ func main() {
app := &cli.App{
Name: "lotus-fountain",
Usage: "Devnet token distribution utility",
Version: build.Version,
Version: build.UserVersion,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "repo",

View File

@ -30,7 +30,7 @@ func main() {
app := &cli.App{
Name: "lotus-seal-worker",
Usage: "Remote storage miner worker",
Version: build.Version,
Version: build.UserVersion,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "repo",

View File

@ -36,7 +36,7 @@ func main() {
app := &cli.App{
Name: "lotus-seed",
Usage: "Seal sectors for genesis miner",
Version: build.Version,
Version: build.UserVersion,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "sectorbuilder-dir",

View File

@ -52,7 +52,7 @@ func main() {
app := &cli.App{
Name: "lotus-storage-miner",
Usage: "Filecoin decentralized storage network storage miner",
Version: build.Version,
Version: build.UserVersion,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "repo",

View File

@ -50,7 +50,7 @@ func main() {
app := &cli.App{
Name: "lotus",
Usage: "Filecoin decentralized storage network client",
Version: build.Version,
Version: build.UserVersion,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "repo",