美文网首页
code-push 筆記與坑

code-push 筆記與坑

作者: 活動通Jakevin | 来源:发表于2017-06-24 23:09 被阅读289次

    筆記:

    Command:

    發佈:

    預設是Stage
    code-push release-react <App Name> <android or iOS> --noDuplicateReleaseError

    發Production:加個 --d Production
    code-push release-react <App Name> <android or iOS> --d Production --noDuplicateReleaseError

    察看發送版本:

    code-push deployment ls <App Name>

    包版生成bundle:

    1. 先在專案資料夾下打 mk bundle
    2. 以Android為例
    react-native bundle --platform android --entry-file index.android.js --bundle-output ./bundles/index.android.bundle --dev false
    3.以iOS為例
    react-native bundle --platform ios --entry-file index.ios.js --bundle-output ./bundles/index.ios.bundle --dev false

    發佈:

    Android 為例:
    code-push release <App Name> ./bundles/index.android.bundle 4.0.1 --deploymentName <Staging or Production> --mandatory true
    iOS 為例:
    code-push release <App Name> ./bundles/index.ios.bundle 4.0.1 --deploymentName <Staging or Production> --mandatory true

    坑:

    [Error] The uploaded package is identical to the contents of the specified deployment's current release.

    起因,發佈新stage上去後產生的錯誤

    解法:command 後 加上 --noDuplicateReleaseError

    code-push release-react <AppName> android --noDuplicateReleaseError

    2.

    相关文章

      网友评论

          本文标题:code-push 筆記與坑

          本文链接:https://www.haomeiwen.com/subject/utfhcxtx.html