@@ -32,10 +32,16 @@ import (
3232 "github.com/thomas-vilte/matecommit/internal/ui"
3333 "github.com/thomas-vilte/matecommit/internal/vcs"
3434 "github.com/thomas-vilte/matecommit/internal/vcs/github"
35- "github.com/thomas-vilte/matecommit/internal/version"
35+ versionpkg "github.com/thomas-vilte/matecommit/internal/version"
3636 "github.com/urfave/cli/v3"
3737)
3838
39+ var (
40+ version = versionpkg .Version
41+ commit = & versionpkg .GitCommit
42+ date = & versionpkg .BuildDate
43+ )
44+
3945func main () {
4046 app , err := initializeApp ()
4147 if err != nil {
@@ -82,7 +88,7 @@ func initializeApp() (*cli.Command, error) {
8288 return & cli.Command {
8389 Name : "mate-commit" ,
8490 Usage : translations .GetMessage ("app_usage" , 0 , nil ),
85- Version : version . Version ,
91+ Version : versionpkg . Info () ,
8692 Description : translations .GetMessage ("app_description" , 0 , nil ),
8793 Commands : commands ,
8894 EnableShellCompletion : true ,
@@ -274,7 +280,7 @@ func setupCommands(t *i18n.Translations, cfgApp *cfg.Config, gitService *git.Git
274280func startBackgroundVersionCheck () {
275281 go func () {
276282 checker := services .NewVersionUpdater (
277- services .WithCurrentVersion (version .FullVersion ()),
283+ services .WithCurrentVersion (versionpkg .FullVersion ()),
278284 )
279285 _ , _ = checker .CheckForUpdates (context .Background ())
280286 }()
@@ -286,7 +292,7 @@ func handleVersionNotification(t *i18n.Translations) {
286292 cmdName := args [1 ]
287293 if cmdName != "update" && cmdName != "completion" {
288294 checker := services .NewVersionUpdater (
289- services .WithCurrentVersion (version .FullVersion ()),
295+ services .WithCurrentVersion (versionpkg .FullVersion ()),
290296 )
291297
292298 updateInfo , err := checker .GetUpdateInfo ()
0 commit comments