aboutsummaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
Diffstat (limited to 'development')
-rw-r--r--development/sentry-publish.js38
-rw-r--r--development/states/add-token.json5
-rw-r--r--development/states/confirm-sig-requests.json5
-rw-r--r--development/states/currency-localization.json5
-rw-r--r--development/states/first-time.json5
-rw-r--r--development/states/send-new-ui.json5
-rw-r--r--development/states/tx-list-items.json5
7 files changed, 49 insertions, 19 deletions
diff --git a/development/sentry-publish.js b/development/sentry-publish.js
index 7a6d55115..e14f3f176 100644
--- a/development/sentry-publish.js
+++ b/development/sentry-publish.js
@@ -14,21 +14,27 @@ async function start () {
const versionAlreadyExists = await checkIfVersionExists()
// abort if versions exists
if (versionAlreadyExists) {
- console.log(`Version "${VERSION}" already exists on Sentry, aborting sourcemap upload.`)
- return
+ console.log(`Version "${VERSION}" already exists on Sentry, skipping version creation`)
+ } else {
+ // create sentry release
+ console.log(`creating Sentry release for "${VERSION}"...`)
+ await exec(`sentry-cli releases --org 'metamask' --project 'metamask' new ${VERSION}`)
+ console.log(`removing any existing files from Sentry release "${VERSION}"...`)
+ await exec(`sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} delete --all`)
}
- // create sentry release
- console.log(`creating Sentry release for "${VERSION}"...`)
- await exec(`sentry-cli releases --org 'metamask' --project 'metamask' new ${VERSION}`)
- console.log(`removing any existing files from Sentry release "${VERSION}"...`)
- await exec(`sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} delete --all`)
- // upload sentry source and sourcemaps
- console.log(`uploading source files Sentry release "${VERSION}"...`)
- await exec(`for FILEPATH in ./dist/chrome/*.js; do [ -e $FILEPATH ] || continue; export FILE=\`basename $FILEPATH\` && echo uploading $FILE && sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} upload $FILEPATH metamask/$FILE; done;`)
- console.log(`uploading sourcemaps Sentry release "${VERSION}"...`)
- await exec(`sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} upload-sourcemaps ./dist/sourcemaps/ --url-prefix 'sourcemaps'`)
- console.log('all done!')
+ // check if version has artifacts or not
+ const versionHasArtifacts = versionAlreadyExists && await checkIfVersionHasArtifacts()
+ if (!versionHasArtifacts) {
+ // upload sentry source and sourcemaps
+ console.log(`uploading source files Sentry release "${VERSION}"...`)
+ await exec(`for FILEPATH in ./dist/chrome/*.js; do [ -e $FILEPATH ] || continue; export FILE=\`basename $FILEPATH\` && echo uploading $FILE && sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} upload $FILEPATH metamask/$FILE; done;`)
+ console.log(`uploading sourcemaps Sentry release "${VERSION}"...`)
+ await exec(`sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} upload-sourcemaps ./dist/sourcemaps/ --url-prefix 'sourcemaps'`)
+ console.log('all done!')
+ } else {
+ console.log(`Version "${VERSION}" already has artifacts on Sentry, skipping sourcemap upload`)
+ }
}
async function checkIfAuthWorks () {
@@ -45,6 +51,12 @@ async function checkIfVersionExists () {
return versionAlreadyExists
}
+async function checkIfVersionHasArtifacts () {
+ const artifacts = await exec(`sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} list`)
+ // When there's no artifacts, we get a response from the shell like this ['', '']
+ return artifacts[0] && artifacts[0].length > 0
+}
+
async function doesNotFail (asyncFn) {
try {
await asyncFn()
diff --git a/development/states/add-token.json b/development/states/add-token.json
index d04b3a3ca..b59e9b757 100644
--- a/development/states/add-token.json
+++ b/development/states/add-token.json
@@ -107,7 +107,10 @@
"maxModeOn": false,
"editingTransactionId": null
},
- "currentLocale": "en"
+ "currentLocale": "en",
+ "preferences": {
+ "useNativeCurrencyAsPrimaryCurrency": true
+ }
},
"appState": {
"menuOpen": false,
diff --git a/development/states/confirm-sig-requests.json b/development/states/confirm-sig-requests.json
index 5017a4d57..1ffde3938 100644
--- a/development/states/confirm-sig-requests.json
+++ b/development/states/confirm-sig-requests.json
@@ -150,7 +150,10 @@
"maxModeOn": false,
"editingTransactionId": null
},
- "currentLocale": "en"
+ "currentLocale": "en",
+ "preferences": {
+ "useNativeCurrencyAsPrimaryCurrency": true
+ }
},
"appState": {
"menuOpen": false,
diff --git a/development/states/currency-localization.json b/development/states/currency-localization.json
index 847ea11a3..ef28891a3 100644
--- a/development/states/currency-localization.json
+++ b/development/states/currency-localization.json
@@ -108,7 +108,10 @@
"maxModeOn": false,
"editingTransactionId": null
},
- "currentLocale": "en"
+ "currentLocale": "en",
+ "preferences": {
+ "useNativeCurrencyAsPrimaryCurrency": true
+ }
},
"appState": {
"menuOpen": false,
diff --git a/development/states/first-time.json b/development/states/first-time.json
index a31b985a3..ff7078720 100644
--- a/development/states/first-time.json
+++ b/development/states/first-time.json
@@ -37,7 +37,10 @@
"shapeShiftTxList": [],
"lostAccounts": [],
"tokens": [],
- "currentLocale": "en"
+ "currentLocale": "en",
+ "preferences": {
+ "useNativeCurrencyAsPrimaryCurrency": true
+ }
},
"appState": {
"menuOpen": false,
diff --git a/development/states/send-new-ui.json b/development/states/send-new-ui.json
index bb4847155..0cd2f23f2 100644
--- a/development/states/send-new-ui.json
+++ b/development/states/send-new-ui.json
@@ -109,7 +109,10 @@
"maxModeOn": false,
"editingTransactionId": null
},
- "currentLocale": "en"
+ "currentLocale": "en",
+ "preferences": {
+ "useNativeCurrencyAsPrimaryCurrency": true
+ }
},
"appState": {
"menuOpen": false,
diff --git a/development/states/tx-list-items.json b/development/states/tx-list-items.json
index 0d2273cb0..e83179a17 100644
--- a/development/states/tx-list-items.json
+++ b/development/states/tx-list-items.json
@@ -102,7 +102,10 @@
"shapeShiftTxList": [{"depositAddress":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkke","depositType":"BTC","key":"shapeshift","response":{"status":"no_deposits","address":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkke"},"time":1522377459106}],
"lostAccounts": [],
"send": {},
- "currentLocale": "en"
+ "currentLocale": "en",
+ "preferences": {
+ "useNativeCurrencyAsPrimaryCurrency": true
+ }
},
"appState": {
"menuOpen": false,