checkpoint
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime/debug"
|
||||
|
||||
"go.uber.org/fx"
|
||||
"sneak.berlin/go/directory/internal/config"
|
||||
"sneak.berlin/go/directory/internal/database"
|
||||
"sneak.berlin/go/directory/internal/globals"
|
||||
"sneak.berlin/go/directory/internal/importer"
|
||||
"sneak.berlin/go/directory/internal/logger"
|
||||
"sneak.berlin/go/directory/internal/store"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -15,7 +19,21 @@ var (
|
||||
Buildarch string
|
||||
)
|
||||
|
||||
var Commit = func() string {
|
||||
if info, ok := debug.ReadBuildInfo(); ok {
|
||||
for _, setting := range info.Settings {
|
||||
if setting.Key == "vcs.revision" {
|
||||
return setting.Value
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}()
|
||||
|
||||
func main() {
|
||||
|
||||
fmt.Println("Commit: ", Commit)
|
||||
|
||||
globals.Appname = Appname
|
||||
globals.Version = Version
|
||||
globals.Buildarch = Buildarch
|
||||
@@ -24,6 +42,7 @@ func main() {
|
||||
fx.Provide(
|
||||
config.New,
|
||||
database.New,
|
||||
store.New,
|
||||
globals.New,
|
||||
logger.New,
|
||||
importer.New,
|
||||
|
||||
Reference in New Issue
Block a user