From 33cf6dfd4bca7a5105c009b26347b03ee6e861e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 12 Oct 2018 09:15:30 -0400 Subject: [PATCH] add a fix for APK content type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ci/common.groovy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/common.groovy b/ci/common.groovy index 492af7158b..bd132dfa1d 100644 --- a/ci/common.groovy +++ b/ci/common.groovy @@ -101,6 +101,12 @@ def uploadArtifact(path) { if (getBuildType() == 'pr') { bucket = 'status-im-prs' } + /* WARNING: s3cmd can't guess APK MIME content-type */ + def customOpts = '' + if (path.endsWith('apk')) { + customOpts += "--mime-type='application/vnd.android.package-archive'" + } + /* We also need credentials for the upload */ withCredentials([usernamePassword( credentialsId: 'digital-ocean-access-keys', usernameVariable: 'DO_ACCESS_KEY', @@ -109,6 +115,7 @@ def uploadArtifact(path) { sh """ s3cmd \\ --acl-public \\ + ${customOpts} \\ --host='${domain}' \\ --host-bucket='%(bucket)s.${domain}' \\ --access_key=${DO_ACCESS_KEY} \\