allow matching when key word is at the start of the image string
authorMoritz Warning <moritzwarning@web.de>
Sun, 2 Feb 2020 03:51:20 +0000 (04:51 +0100)
committerMoritz Warning <moritzwarning@web.de>
Sun, 2 Feb 2020 03:51:20 +0000 (04:51 +0100)
www/index.js

index 3e754d12efa8c260f2b5d0c3b3af61959e660755..99acb6474d396448581c736f2bab5fe5f3eb68ac 100644 (file)
@@ -220,13 +220,13 @@ function updateImages(dllink, model, target, release, commit, prefix, images) {
 
     for (var i in images) {
       var image = images[i];
-      if (image.includes('-factory')) {
+      if (image.includes('factory')) {
         entries['FACTORY'].push(image);
-      } else if (image.includes('-sysupgrade')) {
+      } else if (image.includes('sysupgrade')) {
         entries['SYSUPGRADE'].push(image);
-      } else if (image.includes('-kernel') || image.includes('-zImage') || image.includes('-uImage')) {
+      } else if (image.includes('kernel') || image.includes('zImage') || image.includes('uImage')) {
         entries['KERNEL'].push(image);
-      } else if (image.includes('-rootfs')) {
+      } else if (image.includes('rootfs')) {
         entries['ROOTFS'].push(image);
       } else if (image.includes('sdcard')) {
         entries['SDCARD'].push(image);