As part of our pipeline, we run the following commands for Android and iOS whenever we merge to master:
# For the android app
appcenter codepush release-react -a the-android-app --target-binary-version $APP_VERSION -d $ENVIRONMENT
# For the ios app
appcenter codepush release-react -a the-ios-app --target-binary-version $APP_VERSION -d $ENVIRONMENT
In some cases, we may merge a branch that does not include any changes to the apps (just configuration, etc.). In these cases we are seeing the following problem:
The iOS build has the following error:
Error: The uploaded package was not released because it is identical to the contents of the specified deployment's current release.
However the Android build does not have this error, although the code is the same. This results in our codepush version being bumped for Android but not for iOS, and the version numbers for the two "identical" apps getting out of sync.
I have tried passing the --disable-duplicate-release-error
flag to the appcenter
command, but this only results in the error being changed to a warning. Since the Android build didn't have the error in the first place, this change doesn't solve the problem.
Question: Is there any way I can a) configure so that Android doesn't release a new codeship version if there are no changes, or b) configure so that iOS matches the Android behavior and does create a new release even if there are no changes? Option a would be preferable because I think that behavior makes more sense, but either would be better than the current behavior.