Disabling live deploy on local testing

I’ve been looking for a way to disable the live deploys when testing the ionic app locally.

The only solution I’ve found so far was to add

<preference name="DisableDeploy" value="true" />

But this requires changing the code only for testing on the main and platform folders, building again. And we risk deploying this configuration in the production release.

Is there a way to automate this and not run the live deploy when not doing a prodution build?

Hi there, did you manage toget any solution for that?
I’ve also just realized that If I mistakenly push that to the release branch I will no longer be able to update the app anymore, ever.

Thanks in advance.