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:
yakumo.izuru
2023-12-04 00:54:29 +00:00
parent 5dbb5fe308
commit 78724661eb
27 changed files with 2566 additions and 1101 deletions

View File

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