refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / _webi / test.js
index d45b87fb0eb4acfd126835a29f84ddac720496cb..1ffbb16d10f78fd27f2a08340085632a76d375a4 100755 (executable)
@@ -66,7 +66,7 @@ Releases.get(path.join(process.cwd(), pkgdir)).then(function (all) {
   var pkgname = path.basename(pkgdir.replace(/\/$/, ''));
   var osrel = os.platform() + '-' + os.release();
   var arch = os.arch();
-  var formats = ['xz', 'tar', 'zip'];
+  var formats = ['exe', 'xz', 'tar', 'zip'];
 
   var rel = all.releases.filter(function (rel) {
     return (
@@ -128,11 +128,15 @@ Releases.get(path.join(process.cwd(), pkgdir)).then(function (all) {
         'REM todo debug'
       );
     }
-    console.info('Has the necessary files?');
-    fs.writeFileSync(bashFile, bashTxt, 'utf-8');
-    console.info('\tNEEDS MANUAL TEST: bash %s', bashFile);
-    fs.writeFileSync(ps1File, ps1Txt, 'utf-8');
-    console.info('\tNEEDS MANUAL TEST: powershell.exe %s', ps1File);
+    console.info('Do the scripts actually work?');
+    if (bashFile && bashTxt) {
+      fs.writeFileSync(bashFile, bashTxt, 'utf-8');
+      console.info('\tNEEDS MANUAL TEST: bash %s', bashFile);
+    }
+    if (ps1File && ps1Txt) {
+      fs.writeFileSync(ps1File, ps1Txt, 'utf-8');
+      console.info('\tNEEDS MANUAL TEST: powershell.exe %s', ps1File);
+    }
     console.info('');
   });
 });