3

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.

elethan
  • 16,408
  • 8
  • 64
  • 87
  • I'm not sure how the disable-duplicate-release-error flag doesn't help? Surely now you're getting a warning rather than an error the build number would increment, then Android would release as normal and the two remain in sync? – P. Brew Mar 24 '22 at 16:37
  • @P.Brew that was was my hope and my original expectation, but I think that flag is just for cases where you don't want the CI step or whatever it might be to fail. The "warning" message I get with that flag is identical except the "warning" language is used instead: `[Warning] The uploaded package was not released because it is identical to the contents of the specified deployment's current release.` The message makes it clear that the package not being released is the expected behavior. What's more surprising to me is that the Android side doesn't behave this way as well. – elethan Mar 24 '22 at 17:57

1 Answers1

-2

You just need to increase the version from Xcode. than publish ios app than code push update command will work

enter image description here

Muhammad Numan
  • 23,222
  • 6
  • 63
  • 80