Basic tools commands

更新时间:
复制 MD 格式

This topic describes a basic tool set for developing an application through Mobile PaaS (mPaaS), including commands related to hotpatch packages and Security Guard images. The commands include:

mpaas inst hotpatch sign

mpaas inst hotpatch sign [OPTIONS]

Obtains an RSA key pair for generating a hotpatch package.

Options

-I, -- input=INPUT: generates the RSA public key (a .pem file) for the hotpatch package (required)
-o, -- output=PATH: the output path of the signature file
-p, --private-pem=PEM: generates the RSA private key (a .pem file) for the hotpatch package (required)

General options

-h, -- help: displays command help information
    -- verbose: displays more debug information
    -- silent: the silent mode without output information

Examples

mpaas inst hotpatch sign -i /path/to/rsa_public_key.pem -p /path/to/rsa_private_key.pem -o /path/to/output.sig

You can run the mpaas inst hotpatch sign -h command to view help information.

mpaas inst hotpatch package

mpaas inst hotpatch package [OPTIONS]

Signs the original script file to generate a hotpatch package based on the cloud configuration file and the RSA key pair of an application.

Note
  • Private cloud users need to provide the App Secret value (--app-secret). Public cloud users need to provide a cloud configuration file (-c).
  • You can use the existing key file (-p), or run the --gen-key command to automatically generate an RSA key pair.

Options

-I, -- input=INPUT: the script file to be packaged (required)
-o, -- output=PATH: the output path of the hotpatch package to be generated
-c, -- cloud-config=CONFIG: the cloud configuration file of the application (required for the public cloud)
    -- app-secret=SECRET: the App Secret value of the application (required for the private cloud)
--p, --private-pem=PEM: the RSA private key file (a .pem file) used for packaging
    -- gen-key: automatically generates an RSA key pair

General options

-h, -- help: displays command help information
    -- verbose: displays more debug information
    -- silent: the silent mode without output information

Examples

mpaas inst hotpatch package -i /path/to/script.js -p /path/to/rsa_private_key.pem -o /path/to/output --app-secret=xxxx

You can run the mpaas inst hotpatch package -h command to view help information.

mpaas inst sgimage

mpaas inst sgimage [OPTIONS]

Generates a Security Guard image.

Options

-c, --cloud-config=CONFIG: the cloud configuration file of the application (required)
-V, -- jpg-version=VERSION: the specified version that generates the Security Guard image (V5 by default)
-o, -- output=OUTPUT: the output path of the Security Guard image

General options

-h, -- help: displays command help information
    -- verbose: displays more debug information
    -- silent: the silent mode without output information

Examples

mpaas inst sgimage -c /path/to/Ant-mpaas-0D4F511111111-default-IOS.config -o /path/to/output

You can run the mpaas inst sgimage -h command to view help information.