Skip to content

Commit

Permalink
fix the script
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov committed Sep 18, 2024
1 parent 2e986d0 commit 4799fa8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tools/breakingchanges/breaking_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,10 @@ func DetectBreakingChanges(rootPath string) {

eg := &errgroup.Group{}

// Function to process each directory
processDirectory := func(path string) error {
return runGorelease(path)
}

// Check root directory for go.mod
if _, err := os.Stat(filepath.Join(rootPath, "go.mod")); err == nil {
eg.Go(func() error {
return processDirectory(rootPath)
return runGorelease(rootPath)
})
}

Expand All @@ -53,7 +48,7 @@ func DetectBreakingChanges(rootPath string) {
goModPath := filepath.Join(path, "go.mod")
if _, err := os.Stat(goModPath); err == nil {
eg.Go(func() error {
return processDirectory(path)
return runGorelease(path)
})
}

Expand Down Expand Up @@ -123,5 +118,5 @@ func runGorelease(path string) error {
fmt.Printf("%sNo breaking changes found for package %s.%s\n", green, packageFolder, noColor)
}

return nil
return err
}

0 comments on commit 4799fa8

Please sign in to comment.