lotus/build/version.go
Phi-rjan ff0e889b58
build: release: v1.28.0-rc4 (#12190)
* Fix F3 build parameters for `testground` target

Fix renamed `f3Enabled` flag and while at it, add place holder for
manifest server ID.

Fixes #12188

* Update changelog and version

Update changelog and version

---------

Co-authored-by: Masih H. Derkani <m@derkani.org>
2024-07-05 10:38:02 +02:00

62 lines
1.3 KiB
Go

package build
import "os"
type BuildVersion string
var CurrentCommit string
var BuildType int
const (
BuildDefault = 0
BuildMainnet = 0x1
Build2k = 0x2
BuildDebug = 0x3
BuildCalibnet = 0x4
BuildInteropnet = 0x5
BuildButterflynet = 0x7
)
func BuildTypeString() string {
switch BuildType {
case BuildDefault:
return ""
case BuildMainnet:
return "+mainnet"
case Build2k:
return "+2k"
case BuildDebug:
return "+debug"
case BuildCalibnet:
return "+calibnet"
case BuildInteropnet:
return "+interopnet"
case BuildButterflynet:
return "+butterflynet"
default:
return "+huh?"
}
}
// NodeBuildVersion is the local build version of the Lotus daemon
const NodeBuildVersion string = "1.28.0-rc4"
func NodeUserVersion() BuildVersion {
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
return BuildVersion(NodeBuildVersion)
}
return BuildVersion(NodeBuildVersion + BuildTypeString() + CurrentCommit)
}
// MinerBuildVersion is the local build version of the Lotus miner
const MinerBuildVersion = "1.28.0-rc4"
func MinerUserVersion() BuildVersion {
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
return BuildVersion(MinerBuildVersion)
}
return BuildVersion(MinerBuildVersion + BuildTypeString() + CurrentCommit)
}