mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Update update-readme.js
This commit is contained in:
@@ -8,6 +8,7 @@ const _ = require('lodash')
|
||||
let log = []
|
||||
|
||||
const LOGS_DIR = process.env.LOGS_DIR || 'scripts/logs'
|
||||
const LOG_PATH = `${LOGS_DIR}/update-guides.log`
|
||||
|
||||
const options = program
|
||||
.option('-c, --config <config>', 'Set path to config file', '.readme/config.json')
|
||||
@@ -17,6 +18,11 @@ const options = program
|
||||
async function main() {
|
||||
await setUp()
|
||||
|
||||
if (!log.length) {
|
||||
logger.error(`File "${LOG_PATH}" is empty`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
await generateCountriesTable()
|
||||
await generateUSStatesTable()
|
||||
await generateCanadaProvincesTable()
|
||||
@@ -107,5 +113,5 @@ async function updateReadme() {
|
||||
}
|
||||
|
||||
async function setUp() {
|
||||
log = await parser.parseLogs(`${LOGS_DIR}/update-guides.log`)
|
||||
log = await parser.parseLogs(LOG_PATH)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user