Merge pull request #876 from filecoin-project/feat/userversioncommit
Add version commit string
This commit is contained in:
commit
67f79e81c4
3
Makefile
3
Makefile
@ -14,6 +14,7 @@ MODULES:=
|
|||||||
|
|
||||||
CLEAN:=
|
CLEAN:=
|
||||||
BINS:=
|
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
|
## FFI
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ CLEAN+=build/.update-modules
|
|||||||
deps: $(BUILD_DEPS)
|
deps: $(BUILD_DEPS)
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
|
|
||||||
debug: GOFLAGS=-tags=debug
|
debug: GOFLAGS+=-tags=debug
|
||||||
debug: lotus lotus-storage-miner lotus-seal-worker lotus-seed
|
debug: lotus lotus-storage-miner lotus-seal-worker lotus-seed
|
||||||
|
|
||||||
lotus: $(BUILD_DEPS)
|
lotus: $(BUILD_DEPS)
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
package build
|
package build
|
||||||
|
|
||||||
|
var CurrentCommit string
|
||||||
|
|
||||||
// Version is the local build version, set by build system
|
// Version is the local build version, set by build system
|
||||||
const Version = "0.1.0"
|
const Version = "0.1.0"
|
||||||
|
|
||||||
|
var UserVersion = Version + CurrentCommit
|
||||||
|
|
||||||
// APIVersion is a hex semver version of the rpc api exposed
|
// APIVersion is a hex semver version of the rpc api exposed
|
||||||
//
|
//
|
||||||
// M M P
|
// M M P
|
||||||
|
@ -59,7 +59,7 @@ func main() {
|
|||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "lotus-bench",
|
Name: "lotus-bench",
|
||||||
Usage: "Benchmark performance of lotus on your hardware",
|
Usage: "Benchmark performance of lotus on your hardware",
|
||||||
Version: build.Version,
|
Version: build.UserVersion,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "storage-dir",
|
Name: "storage-dir",
|
||||||
|
@ -28,7 +28,7 @@ func main() {
|
|||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "lotus-chainwatch",
|
Name: "lotus-chainwatch",
|
||||||
Usage: "Devnet token distribution utility",
|
Usage: "Devnet token distribution utility",
|
||||||
Version: build.Version,
|
Version: build.UserVersion,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
|
@ -40,7 +40,7 @@ func main() {
|
|||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "lotus-fountain",
|
Name: "lotus-fountain",
|
||||||
Usage: "Devnet token distribution utility",
|
Usage: "Devnet token distribution utility",
|
||||||
Version: build.Version,
|
Version: build.UserVersion,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
|
@ -30,7 +30,7 @@ func main() {
|
|||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "lotus-seal-worker",
|
Name: "lotus-seal-worker",
|
||||||
Usage: "Remote storage miner worker",
|
Usage: "Remote storage miner worker",
|
||||||
Version: build.Version,
|
Version: build.UserVersion,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
|
@ -36,7 +36,7 @@ func main() {
|
|||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "lotus-seed",
|
Name: "lotus-seed",
|
||||||
Usage: "Seal sectors for genesis miner",
|
Usage: "Seal sectors for genesis miner",
|
||||||
Version: build.Version,
|
Version: build.UserVersion,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "sectorbuilder-dir",
|
Name: "sectorbuilder-dir",
|
||||||
|
@ -52,7 +52,7 @@ func main() {
|
|||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "lotus-storage-miner",
|
Name: "lotus-storage-miner",
|
||||||
Usage: "Filecoin decentralized storage network storage miner",
|
Usage: "Filecoin decentralized storage network storage miner",
|
||||||
Version: build.Version,
|
Version: build.UserVersion,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
|
@ -50,7 +50,7 @@ func main() {
|
|||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "lotus",
|
Name: "lotus",
|
||||||
Usage: "Filecoin decentralized storage network client",
|
Usage: "Filecoin decentralized storage network client",
|
||||||
Version: build.Version,
|
Version: build.UserVersion,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
|
Loading…
Reference in New Issue
Block a user