code-push 筆記與坑

筆記:

Command:

發佈:

預設是Stage
code-push release-react --noDuplicateReleaseError

發Production:加個 --d Production
code-push release-react --d Production --noDuplicateReleaseError

察看發送版本:

code-push deployment ls

包版生成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 ./bundles/index.android.bundle 4.0.1 --deploymentName --mandatory true
iOS 為例:
code-push release ./bundles/index.ios.bundle 4.0.1 --deploymentName --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 android --noDuplicateReleaseError

2.

你可能感兴趣的:(code-push 筆記與坑)