forked from hinterland/hearth
feat: vendor gitea 1.16.2
This commit is contained in:
@@ -26,9 +26,8 @@ import (
|
||||
|
||||
// these flags will be set by the build flags
|
||||
var (
|
||||
Version = "development" // program version for this build
|
||||
Tags = "" // the Golang build tags
|
||||
MakeVersion = "" // "make" program version if built with make
|
||||
Version = "development" // program version for this build
|
||||
Tags = "" // the Golang build tags
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -44,14 +43,12 @@ func main() {
|
||||
}
|
||||
app := cmd.NewMainApp(cmd.AppVersion{Version: Version, Extra: formatBuiltWith()})
|
||||
_ = cmd.RunMainApp(app, os.Args...) // all errors should have been handled by the RunMainApp
|
||||
// flush the queued logs before exiting, it is a MUST, otherwise there will be log loss
|
||||
log.GetManager().Close()
|
||||
}
|
||||
|
||||
func formatBuiltWith() string {
|
||||
version := runtime.Version()
|
||||
if len(MakeVersion) > 0 {
|
||||
version = MakeVersion + ", " + runtime.Version()
|
||||
}
|
||||
if len(Tags) == 0 {
|
||||
return " built with " + version
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user