Merge pull request #87 from MasicoreLord/patch-1

Makes host version reflect what it is on linux or macOs as well
This commit is contained in:
JeanOUINA 2020-10-26 12:25:49 +01:00 committed by GitHub
commit b71f67b06f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -40,7 +40,12 @@ electron.ipcMain.on(APP_GET_RELEASE_CHANNEL_SYNC, event => {
electron.ipcMain.on(APP_GET_HOST_VERSION_SYNC, event => {
// hardcode because Discord could identify Lightcord or could simply bug.
event.returnValue = "0.0.308" //electron.app.getVersion();
if(process.platform === "darwin")
event.returnValue = "0.0.259";
else if(process.platform === "linux")
event.returnValue = "0.0.12";
else
event.returnValue = "0.0.308"; //electron.app.getVersion();
});
electron.ipcMain.handle(APP_GET_MODULE_VERSIONS, (() => {
@ -135,4 +140,4 @@ electron.ipcMain.handle(APP_GET_DEFAULT_DOUBLE_CLICK_ACTION, (() => {
return function (_x13) {
return _ref8.apply(this, arguments);
};
})());
})());

View File

@ -2,7 +2,13 @@ import { getCommitID } from "./common/git"
const pak = require("../package.json")
export const releaseChannel:"stable"|"canary"|"ptb"|"development" = "stable"
export const version = "0.0.308"
export let version
if(process.platform === "darwin")
version = "0.0.259"
else if(process.platform === "linux")
version = "0.0.12"
else
version = "0.0.308"
export const commit = getCommitID()
export default {
releaseChannel,
@ -14,4 +20,4 @@ global["BuildInfo"] = {
releaseChannel,
version: pak.version,
commit
}
}