aboutsummaryrefslogtreecommitdiff
path: root/telegabber.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-01-18 07:42:10 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-01-18 07:42:10 +0300
commitd66f87485d2a96ad9723c537c3fd11ee27579104 (patch)
tree6bae9dd6cdb9afbd4b7dbfe04d0185856efb12e3 /telegabber.go
parentd3c6360e3ccb7924dd582269d33dcb27932a054e (diff)
Print commit hash
Diffstat (limited to 'telegabber.go')
-rw-r--r--telegabber.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/telegabber.go b/telegabber.go
index 2f5a6b3..903a5c5 100644
--- a/telegabber.go
+++ b/telegabber.go
@@ -15,7 +15,8 @@ import (
goxmpp "gosrc.io/xmpp"
)
-const version string = "1.3.0"
+var version string = "1.4.0-dev"
+var commit string
var sm *goxmpp.StreamManager
var component *goxmpp.Component
@@ -25,6 +26,10 @@ var cleanupDone chan struct{}
var sigintChannel chan os.Signal
func main() {
+ if commit != "" {
+ version = fmt.Sprintf("%v-%v", version, commit)
+ }
+
var profilingPort = flag.Int("profiling-port", 0, "The port for pprof server")
// YAML config, compatible with the format of Zhabogram 2.0.0
var configPath = flag.String("config", "config.yml", "Config file path")
@@ -55,6 +60,8 @@ func main() {
SetLogrusLevel(config.XMPP.Loglevel)
+ log.Infof("Starting telegabber version %v", version)
+
sm, component, err = xmpp.NewComponent(config.XMPP, config.Telegram)
if err != nil {
log.Fatal(err)