Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit d0e835b

Browse files
Merge pull request #750 from lightninglabs/remove-local-build-autoupdate
Disable auto-update except on official app releases.
2 parents 74268f2 + 3f95778 commit d0e835b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

assets/script/build_app.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ GOPATH=$HOME/gocode
88
GOROOT=$HOME/go
99
PATH=$GOPATH/bin:$GOROOT/bin:$PATH
1010

11+
# activate auto update in app config
12+
echo "module.exports.AUTO_UPDATE_ENABLED = true;" >> ./src/config.js
13+
1114
if [ "$(uname)" == "Darwin" ]; then
1215
# build electron app for macOS
1316
npm run electron-pack -- --mac

public/electron.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const {
1616
LND_PROFILING_PORT,
1717
LND_INIT_DELAY,
1818
BTCD_MINING_ADDRESS,
19+
AUTO_UPDATE_ENABLED,
1920
} = require('../src/config');
2021

2122
console.log(`
@@ -185,7 +186,7 @@ autoUpdater.on('update-downloaded', () => {
185186
});
186187

187188
function initAutoUpdate() {
188-
if (isDev) return;
189+
if (isDev || AUTO_UPDATE_ENABLED !== true) return;
189190
autoUpdater.checkForUpdates();
190191
const oneHour = 60 * 60 * 1000;
191192
setInterval(() => autoUpdater.checkForUpdates(), oneHour);

0 commit comments

Comments
 (0)