The Empress (III)
* Change the way how versions are handled in version.go (to ease `go install`) * Upgrade yaml.v2 to yaml.v3 Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/aya/trunk@75 cec141ff-132a-4243-88a5-ce187bd62f94
This commit is contained in:
14
version.go
14
version.go
@@ -3,17 +3,19 @@ package aya
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
// Version release version
|
||||
Version = "0.0.1"
|
||||
|
||||
// Commit will be overwritten automatically by the build system
|
||||
Commit = "HEAD"
|
||||
// Set to current tag
|
||||
Version = "v0.6.6"
|
||||
Time = time.Now()
|
||||
)
|
||||
|
||||
// FullVersion display the full version and build
|
||||
func FullVersion() string {
|
||||
return fmt.Sprintf("%s@%s", Version, Commit)
|
||||
d := Time.Day()
|
||||
m := Time.Month()
|
||||
y := Time.Year()
|
||||
return fmt.Sprintf("%v || %d.%d.%d", Version, y, m, d)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user