comparison version.go @ 74:d8727551f403 draft

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>
author yakumo.izuru
date Mon, 04 Dec 2023 00:54:29 +0000
parents 7819959ac6ca
children 84270933ac8d
comparison
equal deleted inserted replaced
73:8533d875a2bb 74:d8727551f403
1 // This is used for setting build-time variables 1 // This is used for setting build-time variables
2 package aya 2 package aya
3 3
4 import ( 4 import (
5 "fmt" 5 "fmt"
6 "time"
6 ) 7 )
7 8
8 var ( 9 var (
9 // Version release version 10 // Set to current tag
10 Version = "0.0.1" 11 Version = "v0.6.6"
11 12 Time = time.Now()
12 // Commit will be overwritten automatically by the build system
13 Commit = "HEAD"
14 ) 13 )
15 14
16 // FullVersion display the full version and build 15 // FullVersion display the full version and build
17 func FullVersion() string { 16 func FullVersion() string {
18 return fmt.Sprintf("%s@%s", Version, Commit) 17 d := Time.Day()
18 m := Time.Month()
19 y := Time.Year()
20 return fmt.Sprintf("%v || %d.%d.%d", Version, y, m, d)
19 } 21 }