npm code-push 1.8.1-beta
v1.8.1-beta

latest releases: 4.2.2, 4.2.1, 4.2.0...
8 years ago

This is a feature-packed release that introduces numerous highly requested enhancements. It is available now on NPM and can be installed by running npm i -g code-push-cli@latest.

New Features

  1. Updates can now be "flighted" to only a percentage of your users The release command (and derivatives) includes a new parameter called --rollout that allows you to specify the percentage of users you want to be eligible to receive it. This way you can roll releases out slowly, watch your analytics and crash reporting data to see if everything looks good, and slowly roll it out to more users as desired. More details

    code-push release-react MyApp ios --rollout 25%
  2. The metadata of existing releases can now be edited We introduced a new patch command that lets you edit the mandatory, description, disabled (see below) and rollout properties of an existing release within a specific deployment. This way, if you need to correct a typo in a description, make a release mandatory or optional, or increase the rollout percentage of a flighted release, you can. More details

    code-push patch MyApp Production --rollout 80%
    code-push patch MyApp Staging --label v5 -m false
  3. Releases can now be disabled The release, release-react, release-cordova (see below), patch and promote (see below) commands all now include a new --disabled parameter, which allow you to indicate whether you want a released, edited or promoted update to be downloadable or not.

    // Upload a new release but don't make it immediately available for users
    code-push release-react MyApp ios --disabled
    
    ...
    // When you are ready to release, simply enable the already uploaded update
    code-push patch MyApp Production --disabled false
  4. Update metadata can now be overridden when promoting a release The existing promote command works by creating a new release in the destination deployment, whose content and metadata are equivalent to that of the latest release in the source deployment. In order to support modifying the metadata of the new release, the promote command now includes parameters for --mandatory, --description, --disabled and --rollout. This is effectively a shortcut for doing the promote followed by patch, if you want to ensure that certain attributes are changed immediately as part of the promotion. This can be helpful, for example, if you're using the mandatory and/or description fields differently in Staging and Production. More details.

    code-push promote MyApp Staging Production -m false
  5. Releasing updates to Cordova apps is now much simpler We introduced a new release-cordova command that handles the cordova prepare and code-push release automatically, and infers the app's version and update contents location. This is the Cordova-equivalent of the existing release-react command, and now ensures that developers using either platform have a simpler solution, while still being able to use the "vanilla" release command when more control/flexibility is needed More details

    Before:

    cordova prepare ios
    code-push release MyApp ./platforms/ios/www 1.0.0

    After:

    code-push release-cordova MyApp ios

Bug Fixes

  1. The ZIP file that is created by the CLI when you run the release command is now appropriately deleted even if the release process is rejected (e.g. you attempted to upload an update that is identical to the latest release) or fails.
  2. We resolved an install issue for users running older NPM versions

Breaking Changes

As mentioned in the release notes for the 1.7.0-beta release, we needed to make some breaking changes between the CLI and CodePush server in order to accommodate some performance improvements and feature enhancements. We ended up maintaining both the old and new management servers for two weeks, but as of the 1.8.1-beta release, the old management server is gone, and all users MUST upgrade to 1.7.0+ (we would encourage using 1.8.1-beta since it has a ton of new features!) to continue managing their account.

Once again, to be extremely clear, this will have no impact on end-users at all. It only impacts the CLI and your ability to release updates, not device's ability to receive updates.

If you are reading this, and have already upgraded to the latest CLI, then you don't need to do anything else. If you haven't upgraded to a 1.7.0-beta+ version of the CLI at this point, you will simply get an error message in the CLI asking you to upgrade, at which point, you just simply need to run npm i -g code-push-cli@latest and you're good to go.

Don't miss a new code-push release

NewReleases is sending notifications on new releases.