Skip to content

Commit

Permalink
"override" attribute does not overrides files, instead appends "?over…
Browse files Browse the repository at this point in the history
…ride=1" to name of uploaded files. #133
  • Loading branch information
eyalbe4 authored and eyalbe4 committed Jul 9, 2016
1 parent e1e0a1b commit 0c322da
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,6 @@ class BintrayUploadTask extends DefaultTask {
def uploadArtifact = { artifact ->
def versionPath = packagePath + '/' + versionName ?: artifact.version
def uploadUri = "/content/$versionPath/${artifact.path}"
if (override) {
uploadUri += "?override=1"
}

if (!artifact.file.exists()) {
logger.error("Skipping upload for missing file '$artifact.file'.")
Expand All @@ -367,6 +364,9 @@ class BintrayUploadTask extends DefaultTask {
return
}
http.request(PUT) {
if (override) {
uri.query = [override: "1"]
}
addHeaders(headers)
// Set the requestContentType to BINARY, so that HTTPBuilder can encode the uploaded file:
requestContentType = BINARY
Expand Down

0 comments on commit 0c322da

Please sign in to comment.