(cherry picked from commit e8523067b0
)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
This commit is contained in:
parent
73b8d47172
commit
44456a1b85
|
@ -19,7 +19,7 @@ function createErrorReport(err: Error) {
|
|||
// eslint-disable-next-line no-undef
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
return `Application: ${app.name} ${app.getVersion()} [commit: ${__HASH_VERSION__}]\n` +
|
||||
return `Application: ${app.name} ${app.getVersion()}${__HASH_VERSION__ ? ` [commit: ${__HASH_VERSION__}]` : ''}\n` +
|
||||
`Platform: ${os.type()} ${os.release()} ${os.arch()}\n` +
|
||||
`${err.stack}`;
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ function createTemplate(config: Config) {
|
|||
// eslint-disable-next-line no-undef
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
label: `Version ${app.getVersion()} commit: ${__HASH_VERSION__}`,
|
||||
label: `Version ${app.getVersion()}${__HASH_VERSION__ ? ` commit: ${__HASH_VERSION__}` : ''}`,
|
||||
enabled: false,
|
||||
});
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ window.ipcRenderer.invoke('get-app-version').then(({name, version}) => {
|
|||
// eslint-disable-next-line no-undef
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
console.log(`Starting ${name} v${version} commit: ${__HASH_VERSION__}`);
|
||||
console.log(`Starting ${name} v${version}${__HASH_VERSION__ ? ` commit: ${__HASH_VERSION__}` : ''}`);
|
||||
});
|
||||
|
||||
ReactDOM.render(
|
||||
|
|
|
@ -14,9 +14,10 @@ const path = require('path');
|
|||
|
||||
const VERSION = childProcess.execSync('git rev-parse --short HEAD').toString();
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
const isRelease = process.env.CIRCLE_BRANCH && process.env.CIRCLE_BRANCH.startsWith('release-');
|
||||
|
||||
const codeDefinitions = {
|
||||
__HASH_VERSION__: JSON.stringify(VERSION),
|
||||
__HASH_VERSION__: !isRelease && JSON.stringify(VERSION),
|
||||
};
|
||||
codeDefinitions['process.env.NODE_ENV'] = JSON.stringify(process.env.NODE_ENV);
|
||||
|
||||
|
|
Loading…
Reference in a new issue