Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy CodePush bundle for multiple versions?

I have read about the targetBinary flag and I have also read this from a member of the Microsoft team working on CodePush.

I have version 5.0.1 and 5.1.0.

  • The second version has native differences when comparing to 5.0.1

If a bug comes in for version 5.0.1, how do I fix it and deploy it for this version only? Bugs may be critical and not everyone will have the latest version of the app.

Or, the bug may only exist on a specific version.

Is my only option to:

  • Open Xcode & Android Studio
  • Change my Bundle Versions/Build Number from 5.1.0 to 5.0.1 and then make a change, then change my numbering back?

This seems like a long-winded way of updating a version. Is there a more elegant way of managing this?

like image 425
Dan Avatar asked Mar 19 '18 16:03

Dan


Video Answer


1 Answers

The target binary version param supports ranges for this scenario. Here's a helpful table to guide you.

Range Expression    Who gets the update
----------------    ----------------------
1.2.3               Only devices running the specific binary app store version 1.2.3 of your app
*                   Any device configured to consume updates from your CodePush app
1.2.x               Devices running major version 1, minor version 2 and any patch version of your app
1.2.3 - 1.2.7       Devices running any binary version between 1.2.3 (inclusive) and 1.2.7 (inclusive)
>=1.2.3 <1.2.7      Devices running any binary version between 1.2.3 (inclusive) and 1.2.7 (exclusive)
1.2                 Equivalent to >=1.2.0 <1.3.0
~1.2.3              Equivalent to >=1.2.3 <1.3.0
^1.2.3              Equivalent to >=1.2.3 <2.0.0
like image 165
Patrick Nikoletich Avatar answered Sep 23 '22 07:09

Patrick Nikoletich