Deploy

This command is used to deploy the update to the specified platform.

Checklist

  1. Ensure hot-updater.config.ts is properly configured.
  2. Wrap your components using HotUpdater.wrap.
  3. Register the babel-plugin.
  4. Include the native code.

If you haven’t completed these steps, refer to the quick-start guide.

Options

Options: -p, --platform <platform> specify the platform (choices: "ios", "android") -t, --target-app-version <targetAppVersion> specify the target app version (semver format e.g. 1.0.0, 1.x.x) -f, --force-update force update the app (default: false) -i, --interactive interactive mode (default: false) -h, --help display help for command

Usage

Interactive Mode

Interactive mode guides you through the deployment steps via keyboard inputs.

Execute the following command:

npm
pnpm
yarn
npx hot-updater deploy -i

The -i (or --interactive) flag enables interactive keyboard input.

  • This mode allows you to proceed through deployment steps interactively.

For Continuous Deployment (CD) Pipelines

Use this mode for automating deployment in CI/CD pipelines.

Run the following command:

npm
pnpm
yarn
npx hot-updater deploy -p <"ios" | "android"> -t "1.x.x"
  • This mode is suitable for Continuous Deployment (CD) pipelines.

Force Update

Deploy a forced update for emergency purposes. This will immediately apply the update.

Run the following command:

npm
pnpm
yarn
npx hot-updater deploy -p <"ios" | "android"> -t "1.x.x" -f

The -f (or --force-update) flag enables force update.

Target App Version Range Expression Table

This is a range expression that specifies which app version the deployed bundle will be applied to.

Range ExpressionWho gets the update
1.2.3Only 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.xDevices running major version 1, minor version 2 and any patch version of your app
1.2.3 - 1.2.7Devices running any binary version between 1.2.3 (inclusive) and 1.2.7 (inclusive)
>=1.2.3 < 1.2.7Devices running any binary version between 1.2.3 (inclusive) and 1.2.7 (exclusive)
1.2Equivalent to >=1.2.0 < 1.3.0
~1.2.3Equivalent to >=1.2.3 < 1.3.0
^1.2.3Equivalent to >=1.2.3 < 2.0.0

Update Strategy

Update TypeWhen AppliedHow to Enable
DefaultDownloads the update bundle in the background and applies it when the user restarts the app.Default setting
Force UpdateDownloads the update bundle and applies it immediately.Use the --force-update flag or console.