Add status command

This commit is contained in:
Mikołaj Pęczkowski 2021-11-05 18:19:06 +01:00
parent 2b4c6d3318
commit e26879425f
9 changed files with 589 additions and 10 deletions

View file

@ -10,7 +10,7 @@ import (
const (
APP_NAME = "Git repository manager"
APP_DESCRIPTION = "Manage your repository with simple app"
VERSION = "0.1.1"
VERSION = "0.2.0"
)
type GitRepositoryManager struct {
@ -49,7 +49,6 @@ func (g *GitRepositoryManager) Parse(args []string) {
func (g *GitRepositoryManager) Run() {
if g.cliArguments.Sync {
g.console.InfoFMsg("Synchronizing repositories")
println()
sync := commands.NewSynchronizer(g.configuration.Workspace)
@ -58,6 +57,11 @@ func (g *GitRepositoryManager) Run() {
g.console.InfoFMsg("All repositories are synced")
}
if g.cliArguments.Status {
status := commands.NewStatusChecker(g.configuration.Workspace)
g.runCommand(status)
}
if g.cliArguments.Version {
g.console.InfoFMsg("Current version: %v", VERSION)
}