Compare commits
No commits in common. "95842b00fdda5878b6ad17b2c31e294c4b9145a5" and "25f237f73a0b0cb94f3f741a9e862247b213e536" have entirely different histories.
95842b00fd
...
25f237f73a
4 changed files with 9 additions and 17 deletions
|
@ -1,5 +1,4 @@
|
||||||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|
||||||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
|
||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
|
|
|
@ -1,23 +1,16 @@
|
||||||
package metadata
|
package metadata
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"os"
|
||||||
"runtime/debug"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
func getVersion() string {
|
||||||
GoTomatoVersion = "" // The GoTomato version
|
content, _ := os.ReadFile("version.txt")
|
||||||
ProtocolVersion = "" // The protocol version
|
version := strings.TrimSpace(string(content))
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
return version
|
||||||
info, ok := debug.ReadBuildInfo()
|
|
||||||
fmt.Printf("%v", info)
|
|
||||||
if !ok {
|
|
||||||
GoTomatoVersion = "unknown"
|
|
||||||
}
|
|
||||||
|
|
||||||
GoTomatoVersion = info.Main.Version
|
|
||||||
ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var GoTomatoVersion = getVersion() // The GoTomato version
|
||||||
|
var ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] // The protocol version
|
||||||
|
|
1
version.txt
Normal file
1
version.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
devel
|
Loading…
Reference in a new issue