Skip to content

Commit

Permalink
Speed up build script by avoiding recursing into 3rd-party directories
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Jun 15, 2021
1 parent cda406f commit 32f9a46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions script/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ func sourceFilesLaterThan(t time.Time) bool {
}
}
if info.IsDir() {
if name := filepath.Base(path); name == "vendor" || name == "node_modules" {
return filepath.SkipDir
}
return nil
}
if path == "go.mod" || path == "go.sum" || (strings.HasSuffix(path, ".go") && !strings.HasSuffix(path, "_test.go")) {
Expand Down

0 comments on commit 32f9a46

Please sign in to comment.