From 4304aedbc4edd2b7f7028ab67291591fc5911d48 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Fri, 1 Dec 2017 12:05:07 -0500 Subject: [PATCH] Add check for static files --- index.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index fd00f06..aa12ff7 100755 --- a/index.js +++ b/index.js @@ -37,6 +37,13 @@ ghauth(authOptions, function (err, authData) { platform: platform, url: `${url}/${platform}/${branch.commit.sha}/libchromiumcontent.zip` }) + assets.push({ + branch: branch.name, + commit: branch.commit.sha, + platform: platform, + url: `${url}/${platform}/${branch.commit.sha}/libchromiumcontent-static.zip`, + static: true + }) }) }) @@ -52,16 +59,16 @@ ghauth(authOptions, function (err, authData) { matches.forEach((asset, i) => { const status = asset.available ? '\u2713'.green : '\u2717'.red - + // add space between branches if (!query && i > 0 && asset.branch != assets[i-1].branch) console.log('') - + if (args.urls) { console.log(`${status} ${asset.branch} - ${asset.url}`) - } else { - console.log(`${status} ${asset.branch} - ${asset.commit} - ${asset.platform}`) + } else { + console.log(`${status} ${asset.branch} (${asset.static?'static':'shared'}) - ${asset.commit} - ${asset.platform}`) } - + }) }) .catch(err => { @@ -76,4 +83,4 @@ async function fetch (asset) { } catch (error) { return Object.assign(asset, {available: false}) } -} \ No newline at end of file +}