From 349b6ce245e2938ee3c6865ef51ba17bc7e8a3a4 Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 23 May 2017 15:16:57 -0700 Subject: [PATCH] Add release test for auto updater config Without this file, clients would be stranded on the current version forever. This change extends release-test to verify its presence in a packaged build. // FREEBIE --- Gruntfile.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index d3b789ec1..23e75b10d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -222,10 +222,12 @@ module.exports = function(grunt) { 'test-release': { osx: { archive: 'mac/Signal.app/Contents/Resources/app.asar', + appUpdateYML: 'mac/Signal.app/Contents/Resources/app-update.yml', exe: 'mac/Signal.app/Contents/MacOS/Signal' }, mas: { archive: 'mas/Signal.app/Contents/Resources/app.asar', + appUpdateYML: 'mac/Signal.app/Contents/Resources/app-update.yml', exe: 'mas/Signal.app/Contents/MacOS/Signal' }, linux: { @@ -234,6 +236,7 @@ module.exports = function(grunt) { }, win: { archive: 'win-unpacked/resources/app.asar', + appUpdateYML: 'win-unpacked/resources/app-update.yml', exe: 'win-unpacked/Signal.exe' } }, @@ -437,6 +440,15 @@ module.exports = function(grunt) { } }); + if (config.appUpdateYML) { + var appUpdateYML = [dir, config.appUpdateYML].join('/'); + if (require('fs').existsSync(appUpdateYML)) { + console.log("auto update ok"); + } else { + throw new Error("Missing auto update config " + appUpdateYML); + } + } + var done = this.async(); // A simple test to verify a visible window is opened with a title var Application = require('spectron').Application;