It would be great to be able to ignore certain files from the push, so that files will always be constant unless a native update happens.
It looks like atm its not possible https://github.com/Microsoft/code-push/issues/342
@mdanics - hi.
So as it is stated in the linked reference - currently we have diffing mechanism that will send only those files that were changed.
What is the purpose of ignoring some files unless native update?
@mdanics, just a friendly ping on this
If i've got a number of apps that have the same core, but have a few different files, like css - It would be good to be able to do a single code push to all of them, updating the core but ignoring the custom css files.
This is would be my use, there may be others who would need this feature too
@mdanics
In case there are several apps code-push is unable to determine the relevance between all of them even if their code would be almost the same, so I don't think it would be possible to do a single code-push to all of them. And also code-push need original update source to calculate the diff, otherwise it is impossible to to this job.
So I don't see how this improvement can help in this situation.
I believe we can close this issue at that moment as we do not have plans to implement this currently and also do not get frequent user's request regarding this.
We can always revisit this later if needed.
@max-mironov My use case is that in my app I use values replaced from env variables. I have them set in Appcenter build config (using different build variants) and I replace the contents of one .js file with the values from these env vars during build time (different values for staging, production, ...). But after I do a codepush release, these values are overwritten (by the values I use for dev). I know that I could just write these env variables to a "native" file and then read it from RN, but that would require me to include a lib that could read files from disk - I don't want to do that. Or I could just create a new file during build time that won't be in the codepush release (since it wouldn't exist locally) and I guess it wouldn't just delete it(?). But these are only solutions because I need to get around something. In my opinion there should definitely be a possibility to have a .codepushignore file where you can exclude files from a codepush release, it just seems obvious.
Most helpful comment
@max-mironov My use case is that in my app I use values replaced from env variables. I have them set in Appcenter build config (using different build variants) and I replace the contents of one .js file with the values from these env vars during build time (different values for staging, production, ...). But after I do a codepush release, these values are overwritten (by the values I use for dev). I know that I could just write these env variables to a "native" file and then read it from RN, but that would require me to include a lib that could read files from disk - I don't want to do that. Or I could just create a new file during build time that won't be in the codepush release (since it wouldn't exist locally) and I guess it wouldn't just delete it(?). But these are only solutions because I need to get around something. In my opinion there should definitely be a possibility to have a .codepushignore file where you can exclude files from a codepush release, it just seems obvious.