Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
use correct browser-laptop version and set default channel to ‘’
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Oct 24, 2017
1 parent ab5a6e9 commit 7317c70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const config = require('../js/constants/buildConfig')

// The current channel is retrieved first from the buildConfig constants file,
// then the environments and finally defaults to dev
var channel = config.channel || process.env.CHANNEL || 'dev'
let channels = new Set(['dev', 'beta', 'stable', 'developer', 'nightly'])
var channel = config.channel || process.env.CHANNEL || ''
let channels = new Set(['dev', 'beta', 'stable', 'developer', 'nightly', ''])

if (!channels.has(channel)) {
throw new Error(`Invalid channel ${channel}`)
Expand Down
12 changes: 6 additions & 6 deletions app/crash-herald.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

const buildConfig = require('../js/constants/buildConfig')
const Channel = require('./channel')
const {app} = require('electron')

const version = buildConfig.BROWSER_LAPTOP_REV || 'unknown'
const version = app.getVersion()
const channel = Channel.channel()

const crashKeys = {
Expand All @@ -15,17 +15,17 @@ const crashKeys = {
}

const initCrashKeys = () => {
// set muon-app-version switch to pass version to renderer processes
app.commandLine.appendSwitch('muon-app-version', version)
app.commandLine.appendSwitch('muon-app-channel', channel)

for (let key in crashKeys) {
muon.crashReporter.setCrashKeyValue(key, crashKeys[key])
}
}

exports.init = (enabled) => {
initCrashKeys()
const {app} = require('electron')
// set muon-app-version switch to pass version to renderer processes
app.commandLine.appendSwitch('muon-app-version', version)
app.commandLine.appendSwitch('muon-app-channel', channel)
muon.crashReporter.setEnabled(enabled)
if (enabled) {
console.log('Crash reporting enabled')
Expand Down

0 comments on commit 7317c70

Please sign in to comment.