mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-14 04:48:40 -09:00
feat: in development, use git-describe for appVersion (#729)
Normally appVersion is set from package.json closes #718
This commit is contained in:
parent
d85bde5b3b
commit
32a665d7c0
2 changed files with 7 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ const isDev = require('electron-is-dev');
|
||||||
const AutoUpdater = require('./auto-updater');
|
const AutoUpdater = require('./auto-updater');
|
||||||
const toElectronBackgroundColor = require('./utils/to-electron-background-color');
|
const toElectronBackgroundColor = require('./utils/to-electron-background-color');
|
||||||
const notify = require('./notify');
|
const notify = require('./notify');
|
||||||
|
const { gitDescribe } = require('git-describe');
|
||||||
|
|
||||||
app.commandLine.appendSwitch('js-flags', '--harmony');
|
app.commandLine.appendSwitch('js-flags', '--harmony');
|
||||||
|
|
||||||
|
|
@ -36,6 +37,11 @@ app.getLastFocusedWindow = () => {
|
||||||
|
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
console.log('running in dev mode');
|
console.log('running in dev mode');
|
||||||
|
|
||||||
|
// Overide default appVersion which is set from package.json
|
||||||
|
gitDescribe({customArguments: ['--tags']}, (error, gitInfo) => {
|
||||||
|
if (!error) app.setVersion(gitInfo.raw);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log('running in prod mode');
|
console.log('running in prod mode');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
"electron-is-dev": "0.1.1",
|
"electron-is-dev": "0.1.1",
|
||||||
"file-uri-to-path": "0.0.2",
|
"file-uri-to-path": "0.0.2",
|
||||||
"gaze": "1.1.0",
|
"gaze": "1.1.0",
|
||||||
|
"git-describe": "3.0.2",
|
||||||
"mkdirp": "0.5.1",
|
"mkdirp": "0.5.1",
|
||||||
"ms": "0.7.1",
|
"ms": "0.7.1",
|
||||||
"shell-env": "0.2.0",
|
"shell-env": "0.2.0",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue