2017-10-19 23:04:47 +00:00
|
|
|
/* eslint-disable no-sync */
|
2017-01-25 12:19:27 +00:00
|
|
|
|
2017-07-26 19:02:31 +00:00
|
|
|
import * as fs from 'fs'
|
2017-07-26 19:27:18 +00:00
|
|
|
import { getLogFiles } from './review-logs'
|
2017-01-25 12:19:27 +00:00
|
|
|
|
|
|
|
function reviewLogs() {
|
2017-07-26 19:27:18 +00:00
|
|
|
getLogFiles().forEach(file => {
|
|
|
|
console.log(`opening ${file}:`)
|
|
|
|
const text = fs.readFileSync(file, 'utf-8')
|
|
|
|
console.log(text)
|
2017-01-25 12:19:27 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
if (process.platform === 'darwin') {
|
2017-09-12 12:30:03 +00:00
|
|
|
reviewLogs()
|
2017-01-25 12:19:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (process.platform === 'win32') {
|
2017-01-30 08:35:07 +00:00
|
|
|
if (process.env.APPVEYOR_TEST_RESULT !== '0') {
|
2017-01-25 12:19:27 +00:00
|
|
|
reviewLogs()
|
|
|
|
}
|
|
|
|
}
|