]> xenbits.xensource.com Git - www-xenproject-org.git/commitdiff
getLinks: Always have a newline at the end of files
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 19 Dec 2024 13:31:02 +0000 (13:31 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 19 Dec 2024 13:57:20 +0000 (13:57 +0000)
This reduces diff churn.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
assets/data/downloads-latest.json
assets/data/downloads.json
scripts/downloads/getLinks.js
static/data/downloads.json

index 9e93fdd6f22aa5282eec6f7105b03964a9dd84f1..a253862fc364f8646cd5008b45af165e20cfecbc 100644 (file)
       }
     ]
   }
-]
\ No newline at end of file
+]
index e1bd0ec521fb5dabf3c0caf12467d5e5079bc87e..8554b761fbfaf96fce69b387f920e5e8a080640a 100644 (file)
       }
     ]
   }
-]
\ No newline at end of file
+]
index d0bfb2d4567aebd9dc1fa133f9fd21bb3da599d3..95c60ba95b8cbe77c28b526aa91f578dce706a90 100644 (file)
@@ -117,12 +117,13 @@ async function main() {
     }),
   );
 
-  await fs.writeFile(OUTPUT_FILE, JSON.stringify(output, null, 2));
+  const output_json = JSON.stringify(output, null, 2) + "\n";
+  await fs.writeFile(OUTPUT_FILE, output_json);
   await fs.mkdir(path.dirname(OUTPUT_FILE_STATIC), { recursive: true });
-  await fs.writeFile(OUTPUT_FILE_STATIC, JSON.stringify(output, null, 2));
+  await fs.writeFile(OUTPUT_FILE_STATIC, output_json);
 
-  const latestVersionsData = createLatestVersionsData(output);
-  await fs.writeFile(LATEST_OUTPUT_FILE, JSON.stringify(latestVersionsData, null, 2));
+  const latest_json = JSON.stringify(createLatestVersionsData(output), null, 2) + "\n";
+  await fs.writeFile(LATEST_OUTPUT_FILE, latest_json);
 }
 
 main().catch(console.error);
index e1bd0ec521fb5dabf3c0caf12467d5e5079bc87e..8554b761fbfaf96fce69b387f920e5e8a080640a 100644 (file)
       }
     ]
   }
-]
\ No newline at end of file
+]