upload-app-api-example
upload-app-api-example copied to clipboard
特殊字符,会被Shell展开导致异常
buildUpdateDescription中如包含【 * 】会被Shell展开导致会查询出当目录中的所有文件并输出 建议修改为直接执行命令:
- getUploadToken()
result=$(curl -s
--form-string "_api_key=$api_key"
--form-string "buildType=$buildType"
--form-string "buildInstallType=$buildInstallType"
--form-string "buildPassword=$buildPassword"
--form-string "buildUpdateDescription=$buildUpdateDescription"
--form-string "buildInstallDate=$buildInstallDate"
--form-string "buildInstallStartDate=$buildInstallStartDate"
--form-string "buildInstallEndDate=$buildInstallEndDate"
--form-string "buildChannelShortcut=$buildChannelShortcut"
"${API_BASE_URL}/app/getCOSToken") - uploadFile()
result=$(curl -o /dev/null -w '%{http_code}'
${progress_option}
--form-string "key=$key"
--form-string "signature=$signature"
--form-string "x-cos-security-token=$x_cos_security_token"
--form-string "x-cos-meta-file-name=$file_name"
-F "file=@${file}" ${endpoint}) 3.checkResult() result=$(curl -s "${API_BASE_URL}/app/buildInfo?_api_key=${api_key}&buildKey=${key}")