upload-app-api-example icon indicating copy to clipboard operation
upload-app-api-example copied to clipboard

特殊字符,会被Shell展开导致异常

Open ybADMIN opened this issue 2 months ago • 0 comments

buildUpdateDescription中如包含【 * 】会被Shell展开导致会查询出当目录中的所有文件并输出 建议修改为直接执行命令:

  1. 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")
  2. 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}")

ybADMIN avatar Oct 16 '25 03:10 ybADMIN