Prevent file ignorer from ignoring Dockerfile (and variants), docker-compose.yml

Change-type: patch
Resolves: #1445
Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
Scott Lowe 2020-01-08 15:50:13 +01:00
parent df3e1f1886
commit 95b5ac1c7f

View File

@ -115,6 +115,11 @@ export class FileIgnorer {
return true;
}
// Don't ignore Dockerfile (with or without extension) or docker-compose.yml
if (/^Dockerfile$|^Dockerfile\.\S+/.test(path.basename(relFile)) || path.basename(relFile) === 'docker-compose.yml') {
return true;
}
const dockerIgnoreHandle = dockerIgnore();
const gitIgnoreHandle = ignore();