@@ -12,6 +12,7 @@ import (
1212 "github.com/Tomas-vilte/MateCommit/internal/cli/command/pull_requests"
1313 "github.com/Tomas-vilte/MateCommit/internal/cli/command/release"
1414 "github.com/Tomas-vilte/MateCommit/internal/cli/command/suggests_commits"
15+ "github.com/Tomas-vilte/MateCommit/internal/cli/command/update"
1516 "github.com/Tomas-vilte/MateCommit/internal/cli/registry"
1617 cfg "github.com/Tomas-vilte/MateCommit/internal/config"
1718 "github.com/Tomas-vilte/MateCommit/internal/i18n"
@@ -21,6 +22,8 @@ import (
2122 "github.com/Tomas-vilte/MateCommit/internal/infrastructure/git"
2223 "github.com/Tomas-vilte/MateCommit/internal/infrastructure/tickets/jira"
2324 "github.com/Tomas-vilte/MateCommit/internal/infrastructure/vcs/github"
25+ "github.com/Tomas-vilte/MateCommit/internal/services"
26+ "github.com/Tomas-vilte/MateCommit/internal/version"
2427 "github.com/urfave/cli/v3"
2528)
2629
@@ -59,15 +62,15 @@ func initializeApp() (*cli.Command, error) {
5962 container := di .NewContainer (cfgApp , translations )
6063
6164 if err := container .RegisterAIProvider ("gemini" , gemini .NewGeminiProviderFactory ()); err != nil {
62- log .Printf ("Warning: failed to register Gemini provider : %v" , err )
65+ log .Printf ("Warning: no se pudo registrar el proveedor Gemini : %v" , err )
6366 }
6467
6568 if err := container .RegisterVCSProvider ("github" , github .NewGitHubProviderFactory ()); err != nil {
66- log .Printf ("Warning: failed to register GitHub provider : %v" , err )
69+ log .Printf ("Warning: no se pudo registrar el proveedor de GitHub : %v" , err )
6770 }
6871
6972 if err := container .RegisterTicketProvider ("jira" , jira .NewJiraProviderFactory ()); err != nil {
70- log .Printf ("Warning: failed to register Jira provider : %v" , err )
73+ log .Printf ("Warning: no se pudo registrar el proveedor Jira : %v" , err )
7174 }
7275
7376 gitService := git .NewGitService (translations )
@@ -76,7 +79,7 @@ func initializeApp() (*cli.Command, error) {
7679 ctx := context .Background ()
7780 commitService , err := container .GetCommitService (ctx )
7881 if err != nil {
79- log .Printf ("Warning: commit service initialization failed : %v" , err )
82+ log .Printf ("Warning: la inicialización del servicio de confirmación falló : %v" , err )
8083 log .Println ("La IA no está configurada. Podés configurarla con 'matecommit config init'" )
8184 }
8285
@@ -109,6 +112,10 @@ func initializeApp() (*cli.Command, error) {
109112 log .Fatalf ("Error al registrar el comando 'release': %v" , err )
110113 }
111114
115+ if err := registerCommand .Register ("update" , update .NewUpdateCommandFactory ("v1.4.0" )); err != nil {
116+ log .Fatalf ("Error al registrar el comando 'update': %v" , err )
117+ }
118+
112119 commands := registerCommand .CreateCommands ()
113120 commands = append (commands , completion .NewCompletionCommand (translations ))
114121
@@ -122,10 +129,15 @@ func initializeApp() (*cli.Command, error) {
122129 }
123130 commands = append (commands , helpCommand )
124131
132+ go func () {
133+ checker := services .NewVersionUpdater (version .FullVersion (), translations )
134+ checker .CheckForUpdates (context .Background ())
135+ }()
136+
125137 return & cli.Command {
126138 Name : "mate-commit" ,
127139 Usage : translations .GetMessage ("app_usage" , 0 , nil ),
128- Version : "1.4.0" ,
140+ Version : version . Version ,
129141 Description : translations .GetMessage ("app_description" , 0 , nil ),
130142 Commands : commands ,
131143 EnableShellCompletion : true ,
0 commit comments