How to ignore files in the build process?

Hi, I have a yarn monorepo. In my root, I have a builds/ dir, to store dev and preview apks and release abb. I had two apks, and when I was making another build, I noticed that during Compression stage, I had something like Compressed project files 1s (96 MB). I canceled it, removed both apks and when I run it again it said 7.5MB, so those two apks in the root builds/ dir were being included in the compression.

How to avoid it? Anyway to add paths to a ~ .expoignore file?

Managed workflow
eas-cli version: 0.48.0

That’s surprising. EAS Build make a shallow Git clone by default, so should not, as far as I know, do anything with random APKs that are not committed into your Git repository.

But see EAS CLI and Version Control Systems (VCS)

Because of this shallow clone, it ignores files in .gitignore. It uses .easignore similarly, but if both of these files exist it will use .easignore instead of .gitignore.

1 Like

EAS Build make a shallow Git clone by default, so should not, as far as I know, do anything with random APKs that are not committed into your Git repository.

This is not exactly true anymore, by default we are packaging repo manually, .gitingore(or .easignore) is still respected but are some differences to the way git interprets ignore files(it’s described in the doc linked by @wodin)

Shallow clone is done only if you have cli.requireCommit: true in your eas.json, this flow is using git to create archive so it’s exactly the same as content of your repo

1 Like

Thanks @wodin. Actually my .apk and .abb are not included in my .gitignore for now because I want them as quick backups until I have my production line working nicely.

So is there a .easignore? Will try it later. But, certainly it would be good if it included those extensions by default, I don’t think there would be a use for them on the build process. While my case isn’t usual and even probably recommended, it’s still possible to happen.

And, apparently I forgot to mention that I’ve done that said build in --local.