message: Update latest redirect
diff: @@ -58,19 +58,18 @@ node {
  }
  stage('Upload latest redirect object') {
  - def path = "docs/${packageDotJson.name}/latest"
  - debug "path ${path}"
  - // create an empty file the we will assign redirect metadata to.
  - sh "touch ${path}"
  + String filePath = "docs/${packageDotJson.name}/latest"
  + debug "filePath: ${filePath}"
  + sh "touch ${filePath}"
  - def targetPath = "${env.targetS3Path}/../${path}"
  - debug "targetPath ${targetPath}"
  + Srtring targetPath = "${env.targetS3Path}/${packageDotJson.name}/latest"
  + debug "targetPath: ${targetPath}"
  - def latestTargetPath = "${env.targetS3Path}/${packageDotJson.name}/${packageDotJson.version}"
  - debug "latestTargetPath: ${latestTargetPath}"
  + String redirectPath = "${env.targetS3Path}/${packageDotJson.name}/${packageDotJson.version}"
  + debug "targetPath: ${targetPath}"
  withAWS(region: env[regionEnvName], endpointUrl: env[endPointUrlEnvName], credentials: env[credentialsIdEnvName]) {
  - s3Upload(bucket:env[bucketEnvName], file:path, path: targetPath, metadatas:["x-amz-website-redirect-location:${latestTargetPath}"])
  + s3Upload(bucket:env[bucketEnvName], file:filePath, path: targetPath, metadatas:["x-amz-website-redirect-location:${redirectPath}"])
  }
  }
  }
  