This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 972
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from brave/darwin-build-script
Build Darwin with app verion
- Loading branch information
Showing
3 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var fs = require('fs') | ||
var exec = require('child_process').exec | ||
|
||
// get our version | ||
var pack = JSON.parse(fs.readFileSync('package.json', 'utf-8')) | ||
var version = pack.version | ||
|
||
// get the electron version | ||
var electronPrebuiltPack = JSON.parse(fs.readFileSync('./node_modules/electron-prebuilt/package.json', 'utf-8')) | ||
var electronVersion = electronPrebuiltPack.version | ||
|
||
console.log('Building version ' + version + ' in Brave-darwin-x64 with Electron ' + electronVersion) | ||
|
||
var cmds = [ | ||
'rm -rf Brave-darwin-x64', | ||
'NODE_ENV=production ./node_modules/webpack/bin/webpack.js', | ||
'rm -f dist/Brave.dmg', | ||
'./node_modules/electron-packager/cli.js . Brave --overwrite --ignore="electron-download|electron-rebuild|electron-packager|electron-builder|electron-prebuilt|electron-rebuild|babel$|babel-(?!polyfill|regenerator-runtime)" --platform=darwin --arch=x64 --version=' + electronVersion + ' --icon=res/app.icns --app-version=' + version | ||
] | ||
|
||
var cmd = cmds.join(' && ') | ||
|
||
console.log(cmd) | ||
|
||
exec(cmd, function (err, stdout, stderr) { | ||
if (err) console.error(err) | ||
console.log(stdout) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var fs = require('fs') | ||
var exec = require('child_process').exec | ||
|
||
// get our version | ||
var pack = JSON.parse(fs.readFileSync('package.json', 'utf-8')) | ||
var version = pack.version | ||
|
||
// get the electron version | ||
var electronPrebuiltPack = JSON.parse(fs.readFileSync('./node_modules/electron-prebuilt/package.json', 'utf-8')) | ||
var electronVersion = electronPrebuiltPack.version | ||
|
||
console.log('Building version ' + version + ' in Brave-win32-x64 with Electron ' + electronVersion) | ||
|
||
var cmds = [ | ||
'rm -rf Brave-win32-x64', | ||
'NODE_ENV=production ./node_modules/webpack/bin/webpack.js', | ||
'rm -f dist/Brave.dmg', | ||
'./node_modules/electron-packager/cli.js . Brave --overwrite --ignore=\"electron-packager|electron-builder|electron-prebuilt|electron-rebuild|babel$|babel-(?!polyfill|regenerator-runtime)\" --platform=win32 --arch=x64 --version=' + electronVersion + ' --icon=res/app.ico --app-version=' + version | ||
] | ||
|
||
var cmd = cmds.join(' && ') | ||
|
||
console.log(cmd) | ||
|
||
exec(cmd, function (err, stdout, stderr) { | ||
if (err) console.error(err) | ||
console.log(stdout) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters