summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNadia Barbosa <nadiabarbosa@me.com>2019-03-13 12:29:36 -0700
committerNadia Barbosa <captainbarbosa@users.noreply.github.com>2019-03-13 14:53:53 -0700
commitc16bfe52e265cb5c54796b3ab6a276088e0857f6 (patch)
treeba87149364ce653567336daf7291d966a8630f31 /scripts
parentfb0b0d5a2bb89a6a7d5137e0c610e2c5105c26d3 (diff)
downloadqtlocation-mapboxgl-c16bfe52e265cb5c54796b3ab6a276088e0857f6.tar.gz
[android, ios] Fix issue in binary size script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/publish_binary_size.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/publish_binary_size.js b/scripts/publish_binary_size.js
index d506596c33..d00bb4bdbe 100755
--- a/scripts/publish_binary_size.js
+++ b/scripts/publish_binary_size.js
@@ -96,18 +96,22 @@ function query(after) {
if (!suite)
continue;
-
- const runs = commit.checkSuites.nodes[0].checkRuns.nodes;
+ const allRuns = commit.checkSuites.nodes[0].checkRuns.nodes;
+
+ const sizeCheckRuns = allRuns.filter(function (run) {
+ return run.name.match(/Size - (\w+) ([\w-]+)/);
+ });
+
const row = [`${commit.oid.slice(0, 7)} - ${commit.messageHeadline}`];
for (let i = 0; i < platforms.length; i++) {
const {platform, arch} = platforms[i];
- const run = runs.find((run) => {
+ const run = sizeCheckRuns.find((run) => {
const [, p, a] = run.name.match(/Size - (\w+) ([\w-]+)/);
return platform === p && arch === a;
});
-
+
row[i + 1] = run ? +run.summary.match(/is (\d+) bytes/)[1] : undefined;
}
rows.push(row);