Skip to content

Commit

Permalink
accept newline-delimited packages and replaces (#46)
Browse files Browse the repository at this point in the history
* accept newline-delimited packages and replaces

Signed-off-by: Jason Hall <[email protected]>

* drop ds_store

Signed-off-by: Jason Hall <[email protected]>

---------

Signed-off-by: Jason Hall <[email protected]>
  • Loading branch information
imjasonh authored Jan 13, 2025
1 parent 04d95b5 commit 6f9ee95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@
# Go workspace file
go.work

bin*
bin*

.DS_Store
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 6f9ee95

Please sign in to comment.