From 4799fa83d329f3df28e5214518eb91f89dfe8dc6 Mon Sep 17 00:00:00 2001 From: skudasov Date: Wed, 18 Sep 2024 09:43:39 +0200 Subject: [PATCH] fix the script --- tools/breakingchanges/breaking_changes.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/breakingchanges/breaking_changes.go b/tools/breakingchanges/breaking_changes.go index 89fe5020b..d99c758d7 100644 --- a/tools/breakingchanges/breaking_changes.go +++ b/tools/breakingchanges/breaking_changes.go @@ -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) }) } @@ -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) }) } @@ -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 }