Skip to content

Commit

Permalink
Release v0.24.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alajmo authored May 27, 2023
1 parent 6138d05 commit 6259e0c
Show file tree
Hide file tree
Showing 17 changed files with 841 additions and 716 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NAME := mani
PACKAGE := github.com/alajmo/$(NAME)
DATE := $(shell date +"%Y %B %d")
GIT := $(shell [ -d .git ] && git rev-parse --short HEAD)
VERSION := v0.23.0
VERSION := v0.24.0

default: build

Expand Down
2 changes: 1 addition & 1 deletion cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ PowerShell:
`,
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Run: generateCompletion,
DisableAutoGenTag: true,
}
Expand Down
7 changes: 5 additions & 2 deletions cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ In-case you need to enter credentials before cloning, run the command without th
// This is necessary since cobra doesn't support pointers for bools
// (that would allow us to use nil as default value)
syncFlags.Parallel = cmd.Flags().Changed("parallel")
syncFlags.SyncRemotes = cmd.Flags().Changed("sync-remotes")

runSync(config, args, projectFlags, syncFlags)
},
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
Expand All @@ -45,6 +47,7 @@ In-case you need to enter credentials before cloning, run the command without th
DisableAutoGenTag: true,
}

cmd.Flags().BoolVarP(&syncFlags.SyncRemotes, "sync-remotes", "r", false, "update existing remotes")
cmd.Flags().BoolVarP(&syncFlags.Parallel, "parallel", "p", false, "clone projects in parallel")
cmd.Flags().BoolVarP(&syncFlags.Status, "status", "s", false, "print sync status only")

Expand Down Expand Up @@ -74,7 +77,7 @@ In-case you need to enter credentials before cloning, run the command without th
}

func runSync(config *dao.Config, args []string, projectFlags core.ProjectFlags, syncFlags core.SyncFlags) {
allProjects := false
var allProjects bool
if len(args) == 0 &&
len(projectFlags.Paths) == 0 &&
len(projectFlags.Tags) == 0 {
Expand All @@ -88,7 +91,7 @@ func runSync(config *dao.Config, args []string, projectFlags core.ProjectFlags,
err := exec.UpdateGitignoreIfExists(config)
core.CheckIfError(err)

err = exec.CloneRepos(config, projects, syncFlags.Parallel)
err = exec.CloneRepos(config, projects, syncFlags)
core.CheckIfError(err)
}

Expand Down
Loading

0 comments on commit 6259e0c

Please # to comment.