some images use - or . as delimiter
authorMoritz Warning <moritzwarning@web.de>
Wed, 12 Feb 2020 20:09:21 +0000 (21:09 +0100)
committerMoritz Warning <moritzwarning@web.de>
Wed, 12 Feb 2020 20:09:21 +0000 (21:09 +0100)
index.js

index e488ac27961b86b36609ff56c17574abe67aafd9..6a7c9e27a7f6674123d2274f788f200e6a8b815e 100644 (file)
--- a/index.js
+++ b/index.js
@@ -245,17 +245,17 @@ function updateImages(release, commit, model, image_link, mobj) {
 
     for (var i in files) {
       var file = files[i];
-      if (file.includes('-factory')) {
+      if (file.includes('factory')) {
         entries['FACTORY'].push(file);
-      } else if (file.includes('-sysupgrade')) {
+      } else if (file.includes('sysupgrade')) {
         entries['SYSUPGRADE'].push(file);
-      } else if (file.includes('-kernel') || file.includes('-zImage') || file.includes('-uImage')) {
+      } else if (file.includes('kernel') || file.includes('zImage') || file.includes('uImage')) {
         entries['KERNEL'].push(file);
-      } else if (file.includes('-rootfs')) {
+      } else if (file.includes('rootfs')) {
         entries['ROOTFS'].push(file);
-      } else if (file.includes('-sdcard')) {
+      } else if (file.includes('sdcard')) {
         entries['SDCARD'].push(file);
-      } else if (file.includes('-tftp')) {
+      } else if (file.includes('tftp')) {
         entries['TFTP'].push(file);
       } else {
         entries['OTHER'].push(file);