@cartona/deploy-cli
v0.0.5
Published
Deploy changes to an Ionic app for live update
Downloads
8
Readme
Cartona Live Update CLI
A replacement for AppFlow's live update feature.
You need to be granted access to Cartona's deploy-api server (by default at deploy-api.cartona.com).
You also need to add code in your Ionic app using @capgo/capacitor-updater.
Using the CLI
Start by installing the CLI globally and access it from the command line in your project folder.
npm install -g @cartona/deploy-cliYou can also install it locally and then access the deploy command from inside package.json or using npm-exec.
npm install --save-dev @cartona/deploy-cliIn your project you must also run the following:
npm install @capgo/capacitor-updater
npx cap syncRun deploy help to learn the available commands and parameters.
Using the credentials provided to you by the server administrator run deploy login at least once.
Whenever a live update is required for an Ionic project, just follow the following steps:
ionic build
deploy uploadCommands will prompt you to provide the required parameters. Alternatively you can pass them as arguments. For example:
deploy upload app=retailer dir=./wwwSave common commands and parameters in your package.json scripts.
Server management
The update-api server has its own API but most common tasks can be performed from this CLI. For example:
deploy list builds app=retailer
deploy list permissions app=retailer
deploy grant username=ahmed app=retailer can_upload=1Run deploy help to learn the available commands and parameters.
Enabling Ionic apps
To receive updates from a deploy-api server, you need a capacitor plugin @cartona/deploy-capacitor.
This is available in its own repository and on NPM.
