set a default version value for mig package Version variable

This commit is contained in:
Aaron Meihm 2017-09-13 14:22:35 -05:00
Родитель 06824ce041
Коммит 927002cc94
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -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"
}
}