github.com/vchain-us/vcn@v0.9.11-0.20210921212052-a2484d23c0b3/pkg/meta/version.go (about) 1 /* 2 * Copyright (c) 2018-2020 vChain, Inc. All Rights Reserved. 3 * This software is released under GPL3. 4 * The full license information can be found under: 5 * https://www.gnu.org/licenses/gpl-3.0.en.html 6 * 7 */ 8 9 package meta 10 11 var version = "" 12 13 var static = "" 14 15 var gitCommit = "" 16 var gitBranch = "" 17 18 // Version returns the current CodeNotary vcn version string 19 func Version() string { 20 return version 21 } 22 23 // StaticBuild returns when the current vcn executable has been statically linked against libraries 24 func StaticBuild() bool { 25 return static == "static" 26 } 27 28 // GitRevision returns the current CodeNotary vcn git revision string 29 func GitRevision() string { 30 rev := gitCommit 31 if gitBranch != "" { 32 rev += " (" + gitBranch + ")" 33 } 34 return rev 35 }