Update merge script to remove entries with empty stops arrays
Generate Release / validate_and_release (push) Successful in 23s Details

This commit is contained in:
Fred Boniface 2024-03-14 12:13:51 +00:00
parent d7c0e0fb02
commit 521761a620
1 changed files with 4 additions and 2 deletions

View File

@ -36,8 +36,10 @@ function sortAndMergeYAMLFiles() {
// Construct the output string // Construct the output string
let outputString = "pis:\n"; let outputString = "pis:\n";
mergedData.forEach(item => { mergedData.forEach(item => {
if (item.stops.length > 0) {
outputString += ` - code: "${item.code}"\n`; outputString += ` - code: "${item.code}"\n`;
outputString += ` stops: [${item.stops.map(stop => `${stop}`).join(',')}]\n`; outputString += ` stops: [${item.stops.map(stop => `${stop}`).join(',')}]\n`;
}
}); });
try { try {