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

Commit

Permalink
Multiple channels release with different installed location and user dir
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Sep 6, 2017
1 parent da33b3f commit 3a87cba
Show file tree
Hide file tree
Showing 52 changed files with 1,962 additions and 360 deletions.
2 changes: 1 addition & 1 deletion app/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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'])
let channels = new Set(['nightly', 'developer', 'beta', 'dev'])

if (!channels.has(channel)) {
throw new Error(`Invalid channel ${channel}`)
Expand Down
20 changes: 19 additions & 1 deletion app/windowsInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,25 @@ const spawn = childProcess.spawn
const spawnSync = childProcess.spawnSync
const execSync = childProcess.execSync
const app = electron.app
const appUserModelId = 'com.squirrel.brave.Brave'
const Channel = require('./channel')
let appUserModelId = 'com.squirrel.brave.Brave'
switch (Channel.channel()) {
case 'nightly':
appUserModelId = 'com.squirrel.BraveNightly.BraveNightly'
break
case 'developer':
appUserModelId = 'com.squirrel.BraveDeveloper.BraveDeveloper'
break
case 'beta':
appUserModelId = 'com.squirrel.BraveBeta.BraveBeta'
break
case 'dev':
appUserModelId = 'com.squirrel.brave.Brave'
break
default:
appUserModelId = 'com.squirrel.brave.Brave'
break
}

const getBraveBinPath = () => {
const appPath = app.getPath('exe')
Expand Down
4 changes: 2 additions & 2 deletions docs/buildingReleases.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ Then do the following per OS:

```
CHANNEL=dev npm run build-package
IDENTIFIER=id-here npm run build-installer
CHANNEL=dev IDENTIFIER=id-here npm run build-installer
```

**Windows:**

```
CHANNEL=dev npm run build-package
CERT_PASSWORD=‘password-here’ npm run build-installer
CHANNEL=dev CERT_PASSWORD=‘password-here’ npm run build-installer
````
Check virus scan: https://www.virustotal.com/en/
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"css-loader": "~0.28.7",
"electron-builder": "^17.1.1",
"electron-chromedriver": "^1.7.1",
"electron-packager": "brave/electron-packager",
"electron-packager": "brave/electron-packager#productDirName-overrides",
"electron-prebuilt": "brave/electron-prebuilt",
"empty-port": "0.0.2",
"enzyme": "^2.9.1",
Expand Down Expand Up @@ -191,8 +191,8 @@
"xml2js": "^0.4.15"
},
"optionalDependencies": {
"electron-installer-debian": "brave/electron-installer-debian",
"electron-installer-redhat": "brave/electron-installer-redhat"
"electron-installer-debian": "brave/electron-installer-debian#userDataDir-override",
"electron-installer-redhat": "brave/electron-installer-redhat#userDataDir-override"
},
"standard": {
"global": [
Expand Down
File renamed without changes.
Loading

0 comments on commit 3a87cba

Please sign in to comment.