Skip to content

Commit

Permalink
accept newline-delimited packages and replaces
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Hall <[email protected]>
  • Loading branch information
imjasonh committed Jan 9, 2025
1 parent 04d95b5 commit 2d08f94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file added cmd/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions cmd/gobump/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var rootCmd = &cobra.Command{
return fmt.Errorf("failed to parse bump file %q: %v", rootFlags.bumpFile, err)
}
} else {
packages := strings.Split(rootFlags.packages, " ")
packages := strings.Fields(rootFlags.packages)
for i, pkg := range packages {
parts := strings.Split(pkg, "@")
if len(parts) != 2 {
Expand All @@ -64,7 +64,7 @@ var rootCmd = &cobra.Command{
}

if len(rootFlags.replaces) != 0 {
replaces := strings.Split(rootFlags.replaces, " ")
replaces := strings.Fields(rootFlags.replaces)
for i, replace := range replaces {
parts := strings.Split(replace, "=")
if len(parts) != 2 {
Expand Down

0 comments on commit 2d08f94

Please sign in to comment.