summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNadia Barbosa <nadiabarbosa@me.com>2019-02-25 15:20:30 -0800
committerNadia Barbosa <captainbarbosa@users.noreply.github.com>2019-02-26 08:46:17 -0800
commit570f0a1432db727f6a98c9354165a26bba9f3637 (patch)
treedb4307187705863ad022f64f872ed5e3fd451bc7 /scripts
parent5e41fd44f2cae99f99d20e0cbf692c03b2bff40f (diff)
downloadqtlocation-mapboxgl-570f0a1432db727f6a98c9354165a26bba9f3637.tar.gz
[build] More granular timestamps for binary metrics collection
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/publish_binary_size.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/publish_binary_size.js b/scripts/publish_binary_size.js
index 1752366a63..d506596c33 100755
--- a/scripts/publish_binary_size.js
+++ b/scripts/publish_binary_size.js
@@ -42,8 +42,7 @@ const platforms = [
const sizeCheckInfo = [];
const rows = [];
-const date = new Date();
-const formattedCurrentDate = `${date.getUTCFullYear()}-${date.getUTCMonth() + 1}-${date.getUTCDate()}`
+const date = new Date().toISOString().substring(0, 19);
function query(after) {
return github.request({
@@ -128,7 +127,7 @@ function query(after) {
'platform' : platform,
'arch': arch,
'size' : runSizeMeasurements[i],
- 'created_at': formattedCurrentDate
+ 'created_at': date
}));
}
}
@@ -155,7 +154,7 @@ github.apps.createInstallationToken({installation_id: SIZE_CHECK_APP_INSTALLATIO
var secondPromise = new AWS.S3({region: 'us-east-1'}).putObject({
Body: zlib.gzipSync(sizeCheckInfo.join('\n')),
Bucket: 'mapbox-loading-dock',
- Key: `raw/mobile.binarysize/${formattedCurrentDate}/mapbox-maps-ios-android-${process.env['CIRCLE_SHA1']}.json.gz`,
+ Key: `raw/mobile.binarysize/${date.substring(0,10)}/mapbox-maps-ios-android-${process.env['CIRCLE_SHA1']}.json.gz`,
CacheControl: 'max-age=300',
ContentEncoding: 'gzip',
ContentType: 'application/json'