Browse Source
Merge pull request #593 from gre/gitrevision
include git revision in sentry & export file name
master
Meriadec Pillet
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
9 additions and
2 deletions
-
.eslintrc
-
flow-defs/globals.js
-
scripts/release.sh
-
src/components/ExportLogsBtn.js
-
src/sentry/install.js
-
webpack/plugins.js
|
|
@ -8,6 +8,7 @@ |
|
|
|
"__TEST__": false, |
|
|
|
"__PROD__": false, |
|
|
|
"__SENTRY_URL__": false, |
|
|
|
"__GIT_REVISION__": false, |
|
|
|
"__PRINT_MODE__": false, |
|
|
|
"__GLOBAL_STYLES__": false, |
|
|
|
"__APP_VERSION__": false, |
|
|
|
|
|
@ -6,6 +6,7 @@ declare var __PROD__: boolean |
|
|
|
declare var __ENV__: string |
|
|
|
declare var __PRINT_MODE__: string |
|
|
|
declare var __SENTRY_URL__: string |
|
|
|
declare var __GIT_REVISION__: string |
|
|
|
declare var __GLOBAL_STYLES__: string |
|
|
|
declare var __APP_VERSION__: string |
|
|
|
declare var __STORYBOOK_ENV__: string |
|
|
|
|
|
@ -20,6 +20,7 @@ fi |
|
|
|
# TODO check if version is not already there |
|
|
|
# TODO check if local git HEAD is EXACTLY our remote master HEAD |
|
|
|
|
|
|
|
export GIT_REVISION=`git rev-parse HEAD` |
|
|
|
export SENTRY_URL=https://db8f5b9b021048d4a401f045371701cb@sentry.io/274561 |
|
|
|
rm -rf ./node_modules/.cache |
|
|
|
yarn |
|
|
|
|
|
@ -30,7 +30,9 @@ class ExportLogsBtn extends Component<{ |
|
|
|
const reportJSON = JSON.stringify(report) |
|
|
|
const path = remote.dialog.showSaveDialog({ |
|
|
|
title: 'Export logs', |
|
|
|
defaultPath: `ledger_export_${moment().format('YYYY-MM-DD_HHmmss')}.json`, |
|
|
|
defaultPath: `ledgerlive-export-${moment().format( |
|
|
|
'YYYY.MM.DD-HH.mm.ss', |
|
|
|
)}-${__GIT_REVISION__ || 'unversionned'}.json`,
|
|
|
|
filters: [ |
|
|
|
{ |
|
|
|
name: 'All Files', |
|
|
|
|
|
@ -8,6 +8,7 @@ export default (Raven: any, shouldSendCallback: () => boolean, userId: string) = |
|
|
|
captureUnhandledRejections: true, |
|
|
|
allowSecretKey: true, |
|
|
|
release: __APP_VERSION__, |
|
|
|
tags: { git_commit: __GIT_REVISION__ }, |
|
|
|
environment: __DEV__ ? 'development' : 'production', |
|
|
|
shouldSendCallback, |
|
|
|
}) |
|
|
|
|
|
@ -3,7 +3,7 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') |
|
|
|
const pkg = require('../package.json') |
|
|
|
require('../src/globals') |
|
|
|
|
|
|
|
const { BUNDLE_ANALYZER, SENTRY_URL, STORYBOOK_ENV } = process.env |
|
|
|
const { BUNDLE_ANALYZER, SENTRY_URL, STORYBOOK_ENV, GIT_REVISION } = process.env |
|
|
|
|
|
|
|
module.exports = type => { |
|
|
|
const plugins = [ |
|
|
@ -12,6 +12,7 @@ module.exports = type => { |
|
|
|
__GLOBAL_STYLES__: JSON.stringify(__GLOBAL_STYLES__), |
|
|
|
__DEV__, |
|
|
|
__PROD__, |
|
|
|
__GIT_REVISION__: JSON.stringify(GIT_REVISION), |
|
|
|
__SENTRY_URL__: JSON.stringify(SENTRY_URL || null), |
|
|
|
__STORYBOOK_ENV__: JSON.stringify(STORYBOOK_ENV), |
|
|
|
'process.env.NODE_ENV': JSON.stringify(__ENV__), |
|
|
|