summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared/version.ts
blob: dc87afaae0abaaae8115a752568e39c5d1d1f0ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { links } from '../config.json';

export function getDownloadUrl(suggestedIsBeta: boolean): string {
  let url = links.download;
  switch (process.platform ?? window.env.platform) {
    case 'win32':
      url += 'windows/';
      break;
    case 'linux':
      url += 'linux/';
      break;
    case 'darwin':
      url += 'macos/';
      break;
  }

  if (suggestedIsBeta) {
    url += 'beta/';
  }

  return url;
}