From 11aad62169e4771eb447f672a90d66c856c5cb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=E2=80=A2=C3=98=E2=80=A2R=E2=80=A2=C3=9C=E2=80=A2S?= Date: Sat, 15 May 2021 08:19:47 +0400 Subject: [PATCH] Stop using elif chains, you twats. --- src/buildInfo.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/buildInfo.ts b/src/buildInfo.ts index 72fc5bc..2e2de32 100644 --- a/src/buildInfo.ts +++ b/src/buildInfo.ts @@ -1,14 +1,16 @@ import { getCommitID } from "./common/git" const pak = require("../package.json") -export const releaseChannel:"stable"|"canary"|"ptb"|"development" = "stable" +type branch = "stable"|"canary"|"ptb"|"development"; + +const buildTargets = { + "darwin":"0.0.259", + "linux":"0.0.12", +} + +export const releaseChannel:branch = "stable" 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" + buildTargets[process.platform] || "0.0.308" export const commit = getCommitID() export default { releaseChannel,