@@ -343,7 +343,7 @@ func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (
343343 }
344344 ld = append (ld , "-extldflags" , "'" + strings .Join (extld , " " )+ "'" )
345345 }
346- // TODO(gballet): revisit after the input api has been defined
346+ // TODO(gballet): revisit after the input api has been defined
347347 if runtime .GOARCH == "wasm" {
348348 ld = append (ld , "-gcflags=all=-d=softfloat" )
349349 }
@@ -462,9 +462,14 @@ func doCheckGenerate() {
462462 )
463463 pathList := []string {filepath .Join (protocPath , "bin" ), protocGenGoPath , os .Getenv ("PATH" )}
464464
465+ excludes := []string {"tests/testdata" , "build/cache" , ".git" }
466+ for i := range excludes {
467+ excludes [i ] = filepath .FromSlash (excludes [i ])
468+ }
469+
465470 for _ , mod := range goModules {
466471 // Compute the origin hashes of all the files
467- hashes , err := build .HashFolder (mod , [] string { "tests/testdata" , "build/cache" , ".git" } )
472+ hashes , err := build .HashFolder (mod , excludes )
468473 if err != nil {
469474 log .Fatal ("Error computing hashes" , "err" , err )
470475 }
@@ -474,7 +479,7 @@ func doCheckGenerate() {
474479 c .Dir = mod
475480 build .MustRun (c )
476481 // Check if generate file hashes have changed
477- generated , err := build .HashFolder (mod , [] string { "tests/testdata" , "build/cache" , ".git" } )
482+ generated , err := build .HashFolder (mod , excludes )
478483 if err != nil {
479484 log .Fatalf ("Error re-computing hashes: %v" , err )
480485 }
0 commit comments