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

Commit

Permalink
Add browser-laptop rev to about:brave
Browse files Browse the repository at this point in the history
Audiors: @aekeus, @bsclifton

Fix #5462
  • Loading branch information
bbondy committed Dec 20, 2016
1 parent daab215 commit d9824b3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ if (!channels.has(channel)) {
exports.channel = () => {
return channel
}

exports.browserLaptopRev = () => process.env.NODE_ENV === 'development'
? require('git-rev-sync').long()
: config.BROWSER_LAPTOP_REV
1 change: 1 addition & 0 deletions app/sessionStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ const setVersionInformation = (data) => {
const os = require('os')
const versionInformation = [
{name: 'Brave', version: app.getVersion()},
{name: 'rev', version: Channel.browserLaptopRev()},
{name: 'Muon', version: process.versions['atom-shell']},
{name: 'libchromiumcontent', version: process.versions['chrome']},
{name: 'V8', version: process.versions.v8},
Expand Down
4 changes: 3 additions & 1 deletion js/about/brave.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class AboutBrave extends React.Component {
value: entry.get('name')
},
{
html: entry.get('version'),
html: entry.get('name') === 'rev'
? <a target='_blank' href={`https://github.com/brave/browser-laptop/commit/${entry.get('version')}`}>{entry.get('version') && entry.get('version').substring(0, 7) || ''}</a>
: entry.get('version'),
value: entry.get('version')
}
])}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
"empty-port": "0.0.2",
"enzyme": "^2.6.0",
"flow-bin": "^0.22.1",
"git-rev-sync": "^1.8.0",
"gulp": "^3.9.0",
"jsdom": "9.4.1",
"jsdom-global": "2.0.0",
Expand Down
3 changes: 2 additions & 1 deletion tools/buildPackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ if (!channels[env.CHANNEL]) {
console.log('Writing buildConfig.js...')
config.writeBuildConfig(
{
channel: env.CHANNEL
channel: env.CHANNEL,
BROWSER_LAPTOP_REV: require('git-rev-sync').long()
},
'buildConfig.js'
)
Expand Down
1 change: 1 addition & 0 deletions tools/lib/ignoredPaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ module.exports = [
'react-addons-test-utils',
'enzyme',
'leveldown',
'git-rev-sync',
'sqlite3'
]

2 comments on commit d9824b3

@aekeus
Copy link
Member

@aekeus aekeus commented on d9824b3 Dec 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ very nice!

@bsclifton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😻

Please sign in to comment.