Skip to content

Commit

Permalink
Do not throw if the selected region is missing from some revision
Browse files Browse the repository at this point in the history
  • Loading branch information
muodov committed Aug 29, 2024
1 parent cd1a411 commit f380402
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/generateHistoricalData.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ async function main() {
// eslint-disable-next-line no-await-in-loop
await git.raw('checkout', tag, '--force');

let domainPath = TRACKER_RADAR_DOMAINS_PATH;
if (fs.existsSync(path.join(domainPath, config.region))) {
domainPath = path.join(domainPath, config.region);
}
const domainPath = path.join(TRACKER_RADAR_DOMAINS_PATH, config.region);
if (!fs.existsSync(domainPath)) {
console.log('Skipping tag: ', chalk.yellow(tag), ' because it doesn\'t contain data for selected region');
continue;
}

Check failure on line 140 in scripts/generateHistoricalData.js

View workflow job for this annotation

GitHub Actions / build (10.x)

Trailing spaces not allowed

const domainFiles = getListOfJSONPathsFromFolder(domainPath);
const entityFiles = getListOfJSONPathsFromFolder(TRACKER_RADAR_ENTITIES_PATH);
Expand Down

0 comments on commit f380402

Please sign in to comment.