@@ -24,11 +24,6 @@ const getNodeVersionDirs = (base) => getChildDirectories(base)
24
24
25
25
// Returns the paths of Dockerfiles that are at: base/*/Dockerfile
26
26
const getDockerfilesInChildDirs = ( base ) => getChildDirectories ( base )
27
- . map ( ( childDir ) => {
28
- console . log ( `Checking ${ childDir } ` ) ;
29
- return childDir ;
30
- } )
31
- . filter ( ( directory ) => ! windowsDirRegex . test ( path . basename ( directory ) ) )
32
27
. map ( ( childDir ) => path . resolve ( childDir , 'Dockerfile' ) ) ;
33
28
34
29
const getAllDockerfiles = ( base ) => getNodeVersionDirs ( base ) . flatMap ( getDockerfilesInChildDirs ) ;
@@ -46,7 +41,7 @@ const getAffectedDockerfiles = (filesAdded, filesModified, filesRenamed) => {
46
41
return getAllDockerfiles ( __dirname ) ;
47
42
}
48
43
49
- const modifiedDockerfiles = files . filter ( ( file ) => file . endsWith ( '/Dockerfile' ) && ! windowsDirRegex . test ( path . dirname ( file ) ) ) ;
44
+ const modifiedDockerfiles = files . filter ( ( file ) => file . endsWith ( '/Dockerfile' ) ) ;
50
45
51
46
// Get Dockerfiles affected by modified docker-entrypoint.sh files
52
47
const entrypointAffectedDockerfiles = files
@@ -76,7 +71,8 @@ const getDockerfileMatrixEntry = (file) => {
76
71
const generateBuildMatrix = ( filesAdded , filesModified , filesRenamed ) => {
77
72
const dockerfiles = [ ...new Set ( getAffectedDockerfiles ( filesAdded , filesModified , filesRenamed ) ) ] ;
78
73
79
- const entries = dockerfiles . map ( getDockerfileMatrixEntry ) ;
74
+ let entries = dockerfiles . map ( getDockerfileMatrixEntry ) ;
75
+ entries = entries . filter ( ( entry ) => ! windowsDirRegex . test ( entry . variant ) ) ;
80
76
81
77
// Return null if there are no entries so we can skip the matrix step
82
78
return entries . length
0 commit comments