summarylogtreecommitdiffstats
path: root/0001-Don-t-use-electron-to-build.patch
blob: 805634fd80aa8ef2c2eee0158727475bedd72ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From d7479bc66f1ab73f971a129c439ee886ba17fde2 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Thu, 21 Jun 2018 05:00:37 -0400
Subject: [PATCH] Don't use electron to build

---
 shared/desktop/package.desktop.tsx   | 22 +---------------------
 shared/desktop/yarn-helper/index.tsx |  2 --
 2 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/shared/desktop/package.desktop.tsx b/shared/desktop/package.desktop.tsx
index 5fb8adf4b4..cf3b401f0e 100644
--- a/shared/desktop/package.desktop.tsx
+++ b/shared/desktop/package.desktop.tsx
@@ -154,14 +154,7 @@ async function main() {
   }
 
   // use the same version as the currently-installed electron
-  console.log('Finding electron version')
-  try {
-    packagerOpts.electronVersion = require('../package.json').devDependencies.electron
-    console.log('Found electron version:', packagerOpts.electronVersion)
-  } catch (err) {
-    console.log("Couldn't parse yarn list to find electron:", err)
-    process.exit(1)
-  }
+  console.log('Finding electron version - skipped')
 
   try {
     await startPack()
@@ -199,19 +192,6 @@ async function startPack() {
     fs.removeSync(desktopPath('build/desktop/dist/fonts'))
 
     rimrafSync(desktopPath('release'))
-
-    let aps = [[platform, arch]]
-    await Promise.all(
-      aps.map(async ([plat, arch]) => {
-        try {
-          const appPaths = await pack(plat, arch)
-          postPack(appPaths, plat, arch)
-        } catch (err) {
-          console.error(err)
-          process.exit(1)
-        }
-      })
-    )
   } catch (err) {
     console.error(err)
     process.exit(1)
diff --git a/shared/desktop/yarn-helper/index.tsx b/shared/desktop/yarn-helper/index.tsx
index 55a4ee8234..c47cde5769 100644
--- a/shared/desktop/yarn-helper/index.tsx
+++ b/shared/desktop/yarn-helper/index.tsx
@@ -1,6 +1,5 @@
 // Helper for cross platform yarn run script commands
 import buildCommands from './build'
-import electronComands from './electron'
 import fontCommands from './font'
 import prettierCommands from './prettier'
 import {execSync} from 'child_process'
@@ -13,7 +12,6 @@ const [, , command, ...rest] = process.argv
 const commands = {
   ...buildCommands,
   ...fontCommands,
-  ...electronComands,
   ...prettierCommands,
   help: {
     code: () => {
-- 
2.45.1