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:=
|
||||
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)
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user