mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
ci - create source-map-explorer build-artifacts (#7141)
* ci - create source-map-explorer build-artifacts * ci - add source-map-explorer builds to metamaskbot comment * lint fix * ci - source-map-explorer - include all bundles
This commit is contained in:
parent
0985e8f012
commit
629f5ef221
@ -213,6 +213,9 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: .
|
at: .
|
||||||
|
- run:
|
||||||
|
name: build:source-map-explorer
|
||||||
|
command: ./development/source-map-explorer.sh
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: dist/sourcemaps
|
path: dist/sourcemaps
|
||||||
destination: builds/sourcemaps
|
destination: builds/sourcemaps
|
||||||
|
@ -23,12 +23,25 @@ async function start () {
|
|||||||
const SHORT_SHA1 = CIRCLE_SHA1.slice(0, 7)
|
const SHORT_SHA1 = CIRCLE_SHA1.slice(0, 7)
|
||||||
const BUILD_LINK_BASE = `https://${CIRCLE_BUILD_NUM}-42009758-gh.circle-artifacts.com/0`
|
const BUILD_LINK_BASE = `https://${CIRCLE_BUILD_NUM}-42009758-gh.circle-artifacts.com/0`
|
||||||
|
|
||||||
const CHROME = `${BUILD_LINK_BASE}/builds/metamask-chrome-${VERSION}.zip`
|
// build the github comment content
|
||||||
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}]: <a href="${CHROME}">chrome</a>, <a href="${FIREFOX}">firefox</a>, <a href="${EDGE}">edge</a>, <a href="${OPERA}">opera</a>`
|
// links to extension builds
|
||||||
|
const platforms = ['chrome', 'firefox', 'opera', 'edge']
|
||||||
|
const buildLinks = platforms.map(platform => {
|
||||||
|
const url = `${BUILD_LINK_BASE}/builds/metamask-${platform}-${VERSION}.zip`
|
||||||
|
return `<a href="${url}">${platform}</a>`
|
||||||
|
}).join(', ')
|
||||||
|
|
||||||
|
// links to bundle browser builds
|
||||||
|
const bundles = ['background', 'ui', 'inpage', 'contentscript', 'libs', 'phishing-detect']
|
||||||
|
const bundleLinks = bundles.map(bundle => {
|
||||||
|
const url = `${BUILD_LINK_BASE}/build-artifacts/source-map-explorer/${bundle}.html`
|
||||||
|
return `<a href="${url}">${bundle}</a>`
|
||||||
|
}).join(', ')
|
||||||
|
|
||||||
|
const exposedContent = `Builds ready [${SHORT_SHA1}]`
|
||||||
|
const hiddenContent = `<ul><li>builds: ${buildLinks}</li><li>bundles: ${bundleLinks}</li></ul>`
|
||||||
|
const commentBody = `<details><summary>${exposedContent}</summary>${hiddenContent}</details>`
|
||||||
|
|
||||||
const JSON_PAYLOAD = JSON.stringify({ body: commentBody })
|
const JSON_PAYLOAD = JSON.stringify({ body: commentBody })
|
||||||
const POST_COMMENT_URI = `https://api.github.com/repos/metamask/metamask-extension/issues/${CIRCLE_PR_NUMBER}/comments`
|
const POST_COMMENT_URI = `https://api.github.com/repos/metamask/metamask-extension/issues/${CIRCLE_PR_NUMBER}/comments`
|
||||||
|
10
development/source-map-explorer.sh
Executable file
10
development/source-map-explorer.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
set -x
|
||||||
|
|
||||||
|
mkdir -p build-artifacts/source-map-explorer
|
||||||
|
npx source-map-explorer dist/chrome/inpage.js --html build-artifacts/source-map-explorer/inpage.html
|
||||||
|
npx source-map-explorer dist/chrome/contentscript.js --html build-artifacts/source-map-explorer/contentscript.html
|
||||||
|
npx source-map-explorer dist/chrome/background.js --html build-artifacts/source-map-explorer/background.html
|
||||||
|
npx source-map-explorer dist/chrome/ui.js --html build-artifacts/source-map-explorer/ui.html
|
||||||
|
npx source-map-explorer dist/chrome/libs.js --html build-artifacts/source-map-explorer/libs.html
|
||||||
|
npx source-map-explorer dist/chrome/phishing-detect.js --html build-artifacts/source-map-explorer/phishing-detect.html
|
@ -269,6 +269,7 @@
|
|||||||
"sesify-viz": "^2.0.1",
|
"sesify-viz": "^2.0.1",
|
||||||
"sinon": "^5.0.0",
|
"sinon": "^5.0.0",
|
||||||
"source-map": "^0.7.2",
|
"source-map": "^0.7.2",
|
||||||
|
"source-map-explorer": "^2.0.1",
|
||||||
"static-server": "^2.2.1",
|
"static-server": "^2.2.1",
|
||||||
"style-loader": "^0.21.0",
|
"style-loader": "^0.21.0",
|
||||||
"stylelint-config-standard": "^18.2.0",
|
"stylelint-config-standard": "^18.2.0",
|
||||||
|
51
yarn.lock
51
yarn.lock
@ -6029,7 +6029,7 @@ convert-source-map@^0.3.3:
|
|||||||
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-0.3.5.tgz#f1d802950af7dd2631a1febe0596550c86ab3190"
|
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-0.3.5.tgz#f1d802950af7dd2631a1febe0596550c86ab3190"
|
||||||
integrity sha1-8dgClQr33SYxof6+BZZVDIarMZA=
|
integrity sha1-8dgClQr33SYxof6+BZZVDIarMZA=
|
||||||
|
|
||||||
convert-source-map@^1.1.0, convert-source-map@^1.5.0:
|
convert-source-map@^1.1.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0:
|
||||||
version "1.6.0"
|
version "1.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
|
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
|
||||||
integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==
|
integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==
|
||||||
@ -7678,6 +7678,11 @@ ejs@^2.4.1, ejs@^2.6.1:
|
|||||||
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0"
|
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0"
|
||||||
integrity sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==
|
integrity sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==
|
||||||
|
|
||||||
|
ejs@^2.6.2:
|
||||||
|
version "2.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.1.tgz#5b5ab57f718b79d4aca9254457afecd36fa80228"
|
||||||
|
integrity sha512-kS/gEPzZs3Y1rRsbGX4UOSjtP/CeJP0CxSNZHYxGfVM/VgLcv0ZqM7C45YyTj2DI2g7+P9Dd24C+IMIg6D0nYQ==
|
||||||
|
|
||||||
electron-download@^3.0.1:
|
electron-download@^3.0.1:
|
||||||
version "3.3.0"
|
version "3.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/electron-download/-/electron-download-3.3.0.tgz#2cfd54d6966c019c4d49ad65fbe65cc9cdef68c8"
|
resolved "https://registry.yarnpkg.com/electron-download/-/electron-download-3.3.0.tgz#2cfd54d6966c019c4d49ad65fbe65cc9cdef68c8"
|
||||||
@ -8078,7 +8083,7 @@ es6-weak-map@^2.0.1, es6-weak-map@^2.0.2:
|
|||||||
es6-iterator "^2.0.1"
|
es6-iterator "^2.0.1"
|
||||||
es6-symbol "^3.1.1"
|
es6-symbol "^3.1.1"
|
||||||
|
|
||||||
escape-html@~1.0.3:
|
escape-html@^1.0.3, escape-html@~1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
||||||
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
|
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
|
||||||
@ -10700,7 +10705,7 @@ glob@7.1.2, glob@^7.0.0, glob@^7.0.3, glob@^7.0.4, glob@^7.0.5, glob@^7.1.0, glo
|
|||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
glob@7.1.4, glob@^7.1.3, glob@~7.1.4:
|
glob@7.1.4, glob@^7.1.3, glob@^7.1.4, glob@~7.1.4:
|
||||||
version "7.1.4"
|
version "7.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
|
||||||
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
|
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
|
||||||
@ -15913,6 +15918,13 @@ open@^6.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-wsl "^1.1.0"
|
is-wsl "^1.1.0"
|
||||||
|
|
||||||
|
open@^6.3.0:
|
||||||
|
version "6.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9"
|
||||||
|
integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==
|
||||||
|
dependencies:
|
||||||
|
is-wsl "^1.1.0"
|
||||||
|
|
||||||
opener@~1.4.0:
|
opener@~1.4.0:
|
||||||
version "1.4.3"
|
version "1.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8"
|
resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8"
|
||||||
@ -18961,7 +18973,7 @@ rimraf@2, rimraf@^2.2.8, rimraf@^2.4.4, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.
|
|||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.0.5"
|
glob "^7.0.5"
|
||||||
|
|
||||||
rimraf@2.6.3, rimraf@^2.6.1:
|
rimraf@2.6.3, rimraf@^2.6.1, rimraf@~2.6.2:
|
||||||
version "2.6.3"
|
version "2.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
|
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
|
||||||
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
|
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
|
||||||
@ -20146,6 +20158,23 @@ source-list-map@^2.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085"
|
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085"
|
||||||
integrity sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==
|
integrity sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==
|
||||||
|
|
||||||
|
source-map-explorer@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map-explorer/-/source-map-explorer-2.0.1.tgz#988721e8320d7b6925bc40289e5de658fe4cad4d"
|
||||||
|
integrity sha512-mv2sv2b6oN2L9n18O/eLrYiP5zfWEHESLq4utWBqNw8GnkbuRuXs8twVCOhMT5hxRzfQgS7Yxh7HlQaW8oeiAQ==
|
||||||
|
dependencies:
|
||||||
|
btoa "^1.2.1"
|
||||||
|
chalk "^2.4.2"
|
||||||
|
convert-source-map "^1.6.0"
|
||||||
|
ejs "^2.6.2"
|
||||||
|
escape-html "^1.0.3"
|
||||||
|
glob "^7.1.4"
|
||||||
|
lodash "^4.17.11"
|
||||||
|
open "^6.3.0"
|
||||||
|
source-map "^0.7.3"
|
||||||
|
temp "^0.9.0"
|
||||||
|
yargs "^13.2.4"
|
||||||
|
|
||||||
source-map-resolve@^0.5.0, source-map-resolve@^0.5.1:
|
source-map-resolve@^0.5.0, source-map-resolve@^0.5.1:
|
||||||
version "0.5.1"
|
version "0.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a"
|
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a"
|
||||||
@ -20229,6 +20258,11 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
|
|||||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||||
|
|
||||||
|
source-map@^0.7.3:
|
||||||
|
version "0.7.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
|
||||||
|
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
|
||||||
|
|
||||||
space-separated-tokens@^1.0.0:
|
space-separated-tokens@^1.0.0:
|
||||||
version "1.1.4"
|
version "1.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.4.tgz#27910835ae00d0adfcdbd0ad7e611fb9544351fa"
|
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.4.tgz#27910835ae00d0adfcdbd0ad7e611fb9544351fa"
|
||||||
@ -21293,6 +21327,13 @@ temp-dir@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
|
resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
|
||||||
integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=
|
integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=
|
||||||
|
|
||||||
|
temp@^0.9.0:
|
||||||
|
version "0.9.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.0.tgz#61391795a11bd9738d4c4d7f55f012cb8f55edaa"
|
||||||
|
integrity sha512-YfUhPQCJoNQE5N+FJQcdPz63O3x3sdT4Xju69Gj4iZe0lBKOtnAMi0SLj9xKhGkcGhsxThvTJ/usxtFPo438zQ==
|
||||||
|
dependencies:
|
||||||
|
rimraf "~2.6.2"
|
||||||
|
|
||||||
tempfile@^2.0.0:
|
tempfile@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265"
|
resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265"
|
||||||
@ -23481,7 +23522,7 @@ yargs@^12.0.1:
|
|||||||
y18n "^3.2.1 || ^4.0.0"
|
y18n "^3.2.1 || ^4.0.0"
|
||||||
yargs-parser "^11.1.1"
|
yargs-parser "^11.1.1"
|
||||||
|
|
||||||
yargs@^13.3.0:
|
yargs@^13.2.4, yargs@^13.3.0:
|
||||||
version "13.3.0"
|
version "13.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83"
|
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83"
|
||||||
integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==
|
integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==
|
||||||
|
Loading…
Reference in New Issue
Block a user