HotCodePush

channel

Create, update, pause, resume and delete channels with hotcodepush channel, including preview channel expiry and the auto-pause policy.

hotcodepush channel manages an app's channels, the stream of releases a group of devices follows. The flag --channel <id|name> names one. Defaults to hotcodepush.json's channel, or production when the file names none.

create

Create a channel in an app, with an expiry for a preview channel and its auto-pause policy. The flags --expires-in and --expires-at exclude each other, and a --failure-* flag left out leaves the default auto-pause policy in place.

OptionTypeDescription
--discoverablebooleanWhether the app's setChannel finds the channel by its name. Pass false to turn it off.
--expires-at <timestamp>stringWhen the preview channel expires, an ISO 8601 timestamp. Protected and default channels have none.
--expires-in <duration>stringHow long until the preview channel expires, 14d or 12h.
--failure-action <action>none | notify | pause | revokeWhat auto-pause does when a release fails too often: pause, revoke, notify or none.
--failure-minimum-update-count <count>numberThe applied updates a release needs before auto-pause judges it.
--failure-threshold-percent <percent>numberThe failure percentage at which auto-pause acts.
--if-not-existsbooleanReturn the channel of that name when it exists instead of failing, for re-run pipelines.
--name <name>stringThe name: letters, digits, - and _, one to 64 characters, unique in the app.
--protectedbooleanWhether only Owners and Admins change what the channel serves. Pass false to turn it off.
hotcodepush channel create --name staging --protected
hotcodepush channel create --name pr-42 --expires-in 14d --if-not-exists --json

get

Print a channel with its device counts, hotcodepush.json's by default. The device counts appear in the text output only.

OptionTypeDescription
--channel <id|name>stringThe channel, by id or name. Defaults to hotcodepush.json's channel.
hotcodepush channel get
hotcodepush channel get --channel staging --json

list

List an app's channels, newest first.

OptionTypeDescription
--limit <count>numberHow many to list, at most 100; 50 by default.
--offset <count>numberHow many to skip: the offset the previous page ended with.
hotcodepush channel list
hotcodepush channel list --app "My App" --json

update

Rename a channel or change its flags, expiry and auto-pause policy. A flag left out leaves its field as it is, and a --clear-* flag sets one back to null. --protected false and --discoverable false turn the flags off.

OptionTypeDescription
--channel <id|name>stringThe channel, by id or name. Defaults to hotcodepush.json's channel.
--clear-expires-atbooleanSets the expiry back to null: the channel never expires.
--clear-failure-actionbooleanSets the action back to null: the default policy applies.
--clear-failure-minimum-update-countbooleanSets the minimum update count back to null: the default policy applies.
--clear-failure-threshold-percentbooleanSets the threshold back to null: the default policy applies.
--discoverablebooleanWhether the app's setChannel finds the channel by its name. Pass false to turn it off.
--expires-at <timestamp>stringWhen the preview channel expires, an ISO 8601 timestamp. Protected and default channels have none.
--expires-in <duration>stringHow long until the preview channel expires, 14d or 12h.
--failure-action <action>none | notify | pause | revokeWhat auto-pause does when a release fails too often: pause, revoke, notify or none.
--failure-minimum-update-count <count>numberThe applied updates a release needs before auto-pause judges it.
--failure-threshold-percent <percent>numberThe failure percentage at which auto-pause acts.
--name <name>stringThe channel's new name: letters, digits, - and _, one to 64 characters.
--protectedbooleanWhether only Owners and Admins change what the channel serves. Pass false to turn it off.
hotcodepush channel update --channel staging --protected
hotcodepush channel update --channel pr-42 --expires-in 7d --json

delete

Delete a channel and its releases. Devices on it keep what they have. Confirms once (--yes in a script). --ignore-not-found makes a channel that is already gone a success, for a pipeline run again. The text output names how many devices were on the channel, and --json prints only its id and name.

OptionTypeDescription
--channel <id|name>stringThe channel, by id or name. Defaults to hotcodepush.json's channel.
--ignore-not-foundbooleanSucceed when the channel does not exist, for re-run pipelines.
hotcodepush channel delete --channel staging
hotcodepush channel delete --channel pr-42 --ignore-not-found --yes --json

pause

Pause a channel, the kill switch: it serves nothing new until resumed. Confirms once (--yes in a script) and applies within about a minute (How an update reaches a device). Pausing one release instead is release pause.

OptionTypeDescription
--channel <id|name>stringThe channel, by id or name. Defaults to hotcodepush.json's channel.
hotcodepush channel pause --channel production
hotcodepush channel pause --channel production --yes --json

resume

Resume a paused channel: it serves its releases again. Confirms once (--yes in a script) and applies within about a minute (How an update reaches a device).

OptionTypeDescription
--channel <id|name>stringThe channel, by id or name. Defaults to hotcodepush.json's channel.
hotcodepush channel resume --channel production
hotcodepush channel resume --channel production --yes --json

Last updated on

On this page