зеркало из https://github.com/mozilla/mig.git
set a default version value for mig package Version variable
This commit is contained in:
Родитель
06824ce041
Коммит
927002cc94
14
version.go
14
version.go
|
@ -6,4 +6,16 @@
|
|||
|
||||
package mig /* import "mig.ninja/mig" */
|
||||
|
||||
var Version string = "20160429-0.51f628c"
|
||||
// Version can be set at compile time to indicate the version of MIG
|
||||
// components. You'd typically want to set this during install using flags
|
||||
// such as -ldflags "-X mig.ninja/mig.Version=20170913-0.06824ce0.dev" when
|
||||
// calling the go build tools.
|
||||
var Version string = ""
|
||||
|
||||
func init() {
|
||||
// If the default value of Version is not being specified using the build
|
||||
// tools, just set a generic version identifier.
|
||||
if Version == "" {
|
||||
Version = "0.unversioned"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче