Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for documentation on .easignore and requireCommit in eas.json #1757

Closed
andy-HM opened this issue Mar 26, 2023 · 4 comments
Closed

Request for documentation on .easignore and requireCommit in eas.json #1757

andy-HM opened this issue Mar 26, 2023 · 4 comments
Labels
eas build enhancement New feature or request

Comments

@andy-HM
Copy link

andy-HM commented Mar 26, 2023

Hello,

I am writing to request better documentation on the usage of .easignore and the requireCommit property in the eas.json. I am finding that documentation in these areas are severely lacking in the Expo documentation.

At the time of writing this, there are 0 results returned from searching "easignore" in the Expo documentation site.

Searching for "requireCommit" does return results in the search but those are mostly instances where requireCommit appears in examples of eas.json.

What I am looking for is:

  1. How does one properly use .easignore
  2. How does requireCommit behave when set to false? When set to false in my case, the uploaded files are half the size as when set to true. Then the build fails because files are missing.
  3. Do these two functions work together? Are they separate?
  4. Any other best practices in these areas

Thank you.

@wkozyra95
Copy link
Contributor

wkozyra95 commented Mar 26, 2023

https://expo.fyi/eas-build-archive

  1. In the root of a repository (it replaces all dockerfiles), but .easignore is subdirectories do not do anything(.dockerignore works the same way)
  2. false is a default
  3. No, .easignore does not work with with requireCommit: true. requireCommit: true is making shallow clone using git(so it can't respect .easignore), and requireCommit: false is packaging files using our implementations that slightly diverges from git specs.
  4. Don't use .easignore, we added it because it was quite common request, but there is always a better approach. Also requireCommit: true would also be consider a best practice, but it was to annoying for some workflows, so we changed the default to false.

You can use eas build:inspect --stage archive to check what will be uploaded)

@dsokal dsokal added enhancement New feature or request eas build labels Mar 28, 2023
@andy-HM
Copy link
Author

andy-HM commented Mar 29, 2023

hello @wkozyra95 thank you for the reply! This is incredibly helpful. I was not aware of this level of documentation on Github for Expo.

@macksal
Copy link
Contributor

macksal commented Nov 18, 2023

I was bitten by this - previously using .easignore but it stopped applying after setting requireCommit: true. This is a little confusing: requireCommit feels like it would a safety feature to make sure the working tree isn't dirty, not a fundamental change to the archiving method.

Would it be appropriate to print a warning if requireCommit: true is specified while a .easignore file is also present?

@bj97301
Copy link

bj97301 commented Jul 13, 2024

@wkozyra95 if theres one file i want to be included in my build(google-services.json) i should duplicate my .gitignore file and then remove the file(s) i want to be included in the build. So for me just the google-services.json file. Sounds about right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eas build enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants