From f06a1b3544cb94abe62e7257088bb17b668b0f4d Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 10 Sep 2019 18:34:45 +0800 Subject: [PATCH] ci - add source-map-explorer builds to metamaskbot comment --- development/metamaskbot-build-announce.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/development/metamaskbot-build-announce.js b/development/metamaskbot-build-announce.js index 719cbd50cf60..8050263452bd 100755 --- a/development/metamaskbot-build-announce.js +++ b/development/metamaskbot-build-announce.js @@ -23,12 +23,23 @@ async function start () { const SHORT_SHA1 = CIRCLE_SHA1.slice(0, 7) const BUILD_LINK_BASE = `https://${CIRCLE_BUILD_NUM}-42009758-gh.circle-artifacts.com/0` - const CHROME = `${BUILD_LINK_BASE}/builds/metamask-chrome-${VERSION}.zip` - const FIREFOX = `${BUILD_LINK_BASE}/builds/metamask-firefox-${VERSION}.zip` - const EDGE = `${BUILD_LINK_BASE}/builds/metamask-edge-${VERSION}.zip` - const OPERA = `${BUILD_LINK_BASE}/builds/metamask-opera-${VERSION}.zip` - - const commentBody = `Builds ready [${SHORT_SHA1}]: chrome, firefox, edge, opera` + // build the github comment content + + // links to extension builds + const buildLinks = platforms.map(platform => { + const url = `${BUILD_LINK_BASE}/builds/metamask-${platform}-${VERSION}.zip` + return `${platform}` + }).join(', ') + + // links to bundle browser builds + const bundleLinks = bundles.map(bundle => { + const url = `${BUILD_LINK_BASE}/build-artifacts/source-map-explorer/${bundle}.html` + return `${bundle}` + }).join(', ') + + const exposedContent = `Builds ready [${SHORT_SHA1}]` + const hiddenContent = `` + const commentBody = `
${exposedContent}${hiddenContent}
` const JSON_PAYLOAD = JSON.stringify({ body: commentBody }) const POST_COMMENT_URI = `https://api.github.com/repos/metamask/metamask-extension/issues/${CIRCLE_PR_NUMBER}/comments`