cd workdirwget "your config file url"
cd workdirmkdir pkg && cd pkgwget https://github.com/tencentyun/car-cli/releases/download/v1.0.0/car.zipunzip car.zipmv ./car/linux/car ../cd ..chmod +x car
Configuration Item | Description | Obtaining Method |
SecretId | TencentCloud API key ID. | Tencent Cloud Console - CAM |
SecretKey | TencentCloud API key. | Tencent Cloud Console - CAM |
AppId | Tencent CloudApp ID. | Tencent Cloud Console - Account Information |
# View help informationcar help

car create-application --name <application_name> [--app-type <application_type>]
Parameter | Required | Description | Prerequisites |
--name | Yes | Application Name | 16 characters or fewer, supporting only Chinese characters, letters, digits, or the hyphen -. |
--app-type | No | Application Type | If not specified, a desktop Application3D is created by default. |
Application Type | Applicable Scenarios | Platform |
Application3D | 3D desktop application. | Desktop Side |
ApplicationXR | Extended reality application. | Desktop Side |
ApplicationWeb | Web desktop application. | Desktop Side |
ApplicationAPK | Android mobile application. | Mobile Side |
# Create a desktop application (default type)car create-application --name my-desktop-app# Create a mobile applicationcar create-application --name my-mobile-app --app-type ApplicationAPK
car create-application-version --app-id <application_id> --name <version_name> --type <package_format> [--regions <distribution_regions>] [--update-mode <update_mode>]
Parameter | Required | Description | Applicable Platform |
--app-id | Yes | Application ID. | Entire platform |
--name | Yes | Version naming. | Entire platform |
--type | Yes | Package file type. | Entire platform |
--regions | No | Distribution region list. | Desktop Side only |
--update-mode | No | Update method. | Desktop Side only |
Platform | Supported Format | Description |
Desktop Side | zip,rar,7z | Compressed package format. |
Mobile Side | apk,xapk,zip | Android installation package format. |
--regions and --update-mode parameters take effect only for desktop applications and do not need to be specified for mobile applications.# Desktop: Create a full update version and distribute it to the Chinese mainland and Tokyo.car create-application-version --app-id app-xxx --name v1.0.0 --type zip --regions ap-chinese-mainland,ap-tokyo --update-mode FULL# Mobile: Create a new versioncar create-application-version --app-id app-xxx --name mobile-v1 --type apk
# Upload a local filecar upload-application-version-file --app-id <application_id> --version-id <version_id> --path <local_path># Upload from a URLcar upload-application-version-file --app-id <application_id> --url <file_url>
Parameter | Required | Description | Must-Knows |
--app-id | Yes | Application ID. | Must match the value used at creation. |
--version-id | Yes | Application version ID. | Required for local upload. |
--path | Yes (local) | Local file path. | Note the differences between Windows and Linux path formats. |
--url | Yes (URL) | File download URL. | Only this parameter is required for URL upload. |
Operating system | Path Format Example |
Windows | C:\\data\\myapp.zip |
Linux/macOS | /data/myapp.apk |
# Upload a local file on Windowscar upload-application-version-file --app-id app-xxx --path C:\\data\\xxx.zip --version-id ver-xxx# Upload a local file on Linuxcar upload-application-version-file --app-id app-xxx --path /data/xxx.apk --version-id ver-xxx# Upload from a URLcar upload-application-version-file --app-id app-xxx --url https://example.com/app.zip
car set-version-online --app-id <application_id> --version-id <version_id>
Parameter | Required | Description |
--app-id | Yes | Application ID. |
--version-id | Yes | Application version ID. |
Platform | Pre-release Verification | Description |
Desktop Side | Verify the startup path. | Ensure the startup path is correctly configured. |
Mobile Side | Skip verification automatically. | No additional configuration required. |
car set-version-online --app-id app-xxx --version-id ver-xxx
car delete-application-version --app-id <application_id> --version-id <version_id>
Parameter | Required | Description |
--app-id | Yes | Application ID. |
--version-id | Yes | Application version ID. |
car delete-application-version --app-id app-xxx --version-id ver-xxx
car describe-application-version --app-id <application_id>
Parameter | Required | Description |
--app-id | Yes | Application ID. |
# Obtain the oldest version (excluding the version currently in use)car describe-application-version --app-id app-xxx | grep -v "Inuse" | awk '{print $1}' | head -n 1
# Query all versionscar describe-application-version --app-id app-xxx# Obtain the oldest version IDcar describe-application-version --app-id app-xxx | grep -v "Inuse" | awk '{print $1}' | head -n 1
Feature Module | Desktop Side | Mobile Side | Description |
Application Type | Application3D ApplicationXR ApplicationWeb | ApplicationAPK | Must be specified during creation. |
Package Format | zip,rar,7z | apk,xapk,zip | Validated by the backend. |
Distribution Region | Supported | Not supported | The --regions parameter is applicable to the desktop side only. |
Update Method | Full update supported | Not supported | The --update-mode parameter is applicable to the desktop side only. |
Release Verification | Verify the startup path | Automatically skipped | Platform differences. |
Parameter | Desktop Side | Mobile Side | Description |
--name | Required | Required | Application name. |
--app-type | Optional (default: Application3D) | Required ApplicationAPK | Application type. |
Parameter | Desktop Side | Mobile Side | Description |
--app-id | Required | Required | Application ID. |
--name | Required | Required | Version name. |
--type | Required | Required | Package format. |
--regions | Optional | Not supported | Distribution region. |
--update-mode | Optional | Not supported | Update method. |
Verification Item | Desktop Side | Mobile Side |
Startup path | Mandatory validation. | Skipped automatically. |
Region Code | Region Name | Type |
ap-chinese-mainland | Chinese mainland | Mainland default |
ap-tokyo | Tokyo Standard Region | International default |
ap-tokyo-fusion | Tokyo Fusion Region | Fusion Region |
ap-seoul | Seoul Standard Region | Standard Region |
ap-seoul-fusion | Seoul Fusion Region | Fusion Region |
ap-singapore | Singapore Standard Region | Standard Region |
ap-singapore-fusion | Singapore Fusion Region | Fusion Region |
eu-frankfurt | Frankfurt Standard Region | Standard Region |
eu-frankfurt-fusion | Frankfurt Fusion Region | Fusion Region |
na-north-america | North America Standard Region | Standard Region |
na-north-america-fusion | North America Fusion Region | Fusion Region |
me-middle-east-fusion | Middle East Fusion Region | Fusion Region |
sa-south-america-fusion | South America Fusion Region | Fusion Region |
ap-chinese-mainland.# 1. Create a desktop applicationcar create-application --name my-desktop-app# 2. Create a new version (full update, distributed to the Chinese mainland and Tokyo)car create-application-version --app-id app-xxx --name v1.0.0 --type zip --regions ap-chinese-mainland,ap-tokyo --update-mode FULL# 3. Upload the application packagecar upload-application-version-file --app-id app-xxx --version-id ver-xxx --path /data/myapp.zip# 4. Release and go livecar set-version-online --app-id app-xxx --version-id ver-xxx
# 1. Create a mobile applicationcar create-application --name my-mobile-app --app-type ApplicationAPK# 2. Create a new version (regions and update-mode are not required)car create-application-version --app-id app-xxx --name v1.0.0 --type apk# 3. Upload the application packagecar upload-application-version-file --app-id app-xxx --version-id ver-xxx --path /data/myapp.apk# 4. Release and go livecar set-version-online --app-id app-xxx --version-id ver-xxx
cd workdir# Query the version list for the corresponding applicationoutput=$(./car describe-application-version --app-id $ApplicationID) # The ApplicationID is configured as a pipeline environment variable.lineCount=$(echo "$output" | wc -l)# If the number of versions exceeds 5, delete the old versions.if [ $lineCount -ge 5 ];thenversionID=$(echo "$output" | grep -v "Inuse" | awk '{print $1}' | head -n 1)./car delete-application-version --app-id $ApplicationID --version-id $versionIDfi# Because deleting an application version is an asynchronous operation, periodically query whether the version has been deleted successfully.waitTimes=0while [ $lineCount -ge 5 ]dooutput=$(./car describe-application-version --app-id $ApplicationID) # Replace with your own ApplicationIDlineCount=$(echo "$output" | wc -l)waitTimes=$((waitTimes+1))if [ $waitTimes -gt 20 ]thenecho "Error: Waiting too long to delete application version."exit 1fisleep 1done# Query the package name and package type based on the PackageURLfileName=$(basename $PackageURL) # The PackageURL is configured as a pipeline environment variable.echo $fileNamefileType="${PackageURL##*.}"echo $fileType# Create a new versionoutput=$(./car create-application-version --app-id $ApplicationID --name $fileName --type $fileType)# Upload the new version of the application to the cloud./car upload-application-version-file --app-id $ApplicationID --version-id $output --path $fileName# Release the new version./car set-version-online --app-id $ApplicationID --version-id $output
\\, for example, C:\\data\\app.zip./, for example, /data/app.zip.Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan