diff --git a/build/version.go b/build/version.go index 57582119b..12b1058b3 100644 --- a/build/version.go +++ b/build/version.go @@ -5,12 +5,6 @@ import "os" var CurrentCommit string var BuildType int -func init() { - if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" { - CurrentCommit = "" - } -} - const ( BuildDefault = 0 BuildMainnet = 0x1 @@ -40,5 +34,9 @@ func buildType() string { const BuildVersion = "1.11.0-dev" func UserVersion() string { + if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" { + return BuildVersion + } + return BuildVersion + buildType() + CurrentCommit } diff --git a/documentation/en/cli-lotus-miner.md b/documentation/en/cli-lotus-miner.md index bd8ed424e..1b9b80ee9 100644 --- a/documentation/en/cli-lotus-miner.md +++ b/documentation/en/cli-lotus-miner.md @@ -7,7 +7,7 @@ USAGE: lotus-miner [global options] command [command options] [arguments...] VERSION: - 1.11.0-dev+mainnet + 1.11.0-dev COMMANDS: init Initialize a lotus miner repo diff --git a/documentation/en/cli-lotus-worker.md b/documentation/en/cli-lotus-worker.md index b04587c4f..0b29da503 100644 --- a/documentation/en/cli-lotus-worker.md +++ b/documentation/en/cli-lotus-worker.md @@ -7,7 +7,7 @@ USAGE: lotus-worker [global options] command [command options] [arguments...] VERSION: - 1.11.0-dev+mainnet + 1.11.0-dev COMMANDS: run Start lotus worker diff --git a/documentation/en/cli-lotus.md b/documentation/en/cli-lotus.md index c93a866ff..2c155aae9 100644 --- a/documentation/en/cli-lotus.md +++ b/documentation/en/cli-lotus.md @@ -7,7 +7,7 @@ USAGE: lotus [global options] command [command options] [arguments...] VERSION: - 1.11.0-dev+mainnet + 1.11.0-dev COMMANDS: daemon Start a lotus daemon process