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

Community report: CLI behaviour does not match containerized behaviour regarding .gitignore files #1225

Closed
PerrySetGo opened this issue Sep 10, 2020 · 4 comments · Fixed by #1272
Assignees
Labels
medium priority type: bug code to address defects in shipped code

Comments

@PerrySetGo
Copy link

Describe the bug

We have a customer report in our Community forums indicating that the behaviour of the CLI and the behaviour of the web app differ in regards to how .gitignore files are treated.

Steps to reproduce the behavior

Please see the discussion in this thread:
https://community.netlify.com/t/dont-apply-gitignore-rules-to-the-publish-directory/21244/7

Expected vs actual behavior

It is our (@PerrySetGo , @depadiernos, @rstavchansky ) expectation that the two should work the same 🤷

@PerrySetGo PerrySetGo added medium priority type: bug code to address defects in shipped code labels Sep 10, 2020
@erezrokah
Copy link
Contributor

Looks like there are 2 different issues in that thread:

  1. regarding . gitignore behaviour during deploy (unrelated to the CLI).
  2. regarding a difference between how our build system deploys the publish directory vs how the CLI deploys the publish directory. It seems the former deploys everything in the publish directory and the latter doesn't upload **/node_modules directories (which was already resolved for the user due to a change in Nuxt behaviour).

@erezrokah
Copy link
Contributor

Looks like node_modules are not ignored in the buildbot:
https://github.com/netlify/open-api/blob/e72e2eb2d7eedf02bccc5916fc0330022f7f823b/go/porcelain/deploy.go#L692
But are ignored in the CLI:
https://github.com/netlify/js-client/blob/55650048fc7fe6288816c1dc172b27024cbd1586/src/deploy/util.js#L11

It makes sense to ignore those in the CLI in some cases, for example when deploying the project directory via:
netlify deploy --dir .

@PerrySetGo
Copy link
Author

i circled back to the community post and thanked them again for their contribution, fyi.

@erezrokah
Copy link
Contributor

Still not published yet, will do that today/tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium priority type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants