作为我们管道的一部分,每当我们合并到 master 时,我们都会为 Android 和 iOS 运行以下命令:
# 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
在某些情况下,我们可能会合并一个不包含对应用程序的任何更改(仅配置等)的分支。在这些情况下,我们会看到以下问题:
iOS 构建有以下错误:
Error: The uploaded package was not released because it is identical to the contents of the specified deployment's current release.
但是 Android 版本没有有这个错误,虽然代码是一样的。这会导致我们的 codepush 版本针对 Android 而不是针对 iOS,并且两个“相同”应用程序的版本号不同步。
我尝试将 --disable-duplicate-release-error
标志传递给 appcenter
命令,但这只会导致错误更改为警告。由于 Android 构建一开始就没有错误,因此此更改不能解决问题。
问题:有什么办法可以 a) 配置 Android 在没有变化的情况下不发布新的代码版本,或者 b) 配置 iOS 匹配 Android 的行为和即使没有更改,是否 创建了一个新版本?选项 a 会更可取,因为我认为该行为更有意义,但两者都比当前行为更好。
最佳答案
关于react-native - appcenter codepush 更新 Android 但不更新 iOS : not released because it is identical to the contents of the specified deployment's current release,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71603993/