diff options
author | Nadia Barbosa <nadiabarbosa@me.com> | 2019-02-25 15:20:30 -0800 |
---|---|---|
committer | Nadia Barbosa <captainbarbosa@users.noreply.github.com> | 2019-02-26 08:46:17 -0800 |
commit | 570f0a1432db727f6a98c9354165a26bba9f3637 (patch) | |
tree | db4307187705863ad022f64f872ed5e3fd451bc7 /scripts | |
parent | 5e41fd44f2cae99f99d20e0cbf692c03b2bff40f (diff) | |
download | qtlocation-mapboxgl-570f0a1432db727f6a98c9354165a26bba9f3637.tar.gz |
[build] More granular timestamps for binary metrics collection
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/publish_binary_size.js | 7 |
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' |