aboutsummaryrefslogtreecommitdiffstats
path: root/params/version.go
diff options
context:
space:
mode:
Diffstat (limited to 'params/version.go')
-rw-r--r--params/version.go28
1 files changed, 19 insertions, 9 deletions
diff --git a/params/version.go b/params/version.go
index fef360473..b46c980dd 100644
--- a/params/version.go
+++ b/params/version.go
@@ -1,27 +1,29 @@
// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// This file is part of the go-ethereum library.
//
-// go-ethereum is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
+// The go-ethereum library is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// go-ethereum is distributed in the hope that it will be useful,
+// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
+// GNU Lesser General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Lesser General Public License
+// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
package params
-import "fmt"
+import (
+ "fmt"
+)
const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 6 // Minor version component of the current release
- VersionPatch = 0 // Patch version component of the current release
+ VersionPatch = 1 // Patch version component of the current release
VersionMeta = "unstable" // Version metadata to append to the version string
)
@@ -33,3 +35,11 @@ var Version = func() string {
}
return v
}()
+
+func VersionWithCommit(gitCommit string) string {
+ vsn := Version
+ if len(gitCommit) >= 8 {
+ vsn += "-" + gitCommit[:8]
+ }
+ return vsn
+}