2017-10-19 23:04:47 +00:00
|
|
|
/* eslint-disable no-sync */
|
2017-01-25 12:19:27 +00:00
|
|
|
|
2017-07-26 19:00:57 +00:00
|
|
|
import * as fs from 'fs'
|
|
|
|
import * as cp from 'child_process'
|
2017-07-26 19:27:18 +00:00
|
|
|
import { getLogFiles } from './review-logs'
|
2017-11-20 01:30:16 +00:00
|
|
|
import { getProductName } from '../app/package-info'
|
2020-08-25 12:38:18 +00:00
|
|
|
import { getDistPath, isPublishable } from './dist-info'
|
2020-08-25 12:51:11 +00:00
|
|
|
import { isGitHubActions } from './build-platforms'
|
2017-06-19 08:55:02 +00:00
|
|
|
|
2020-08-25 12:51:11 +00:00
|
|
|
if (isGitHubActions() && process.platform === 'darwin' && isPublishable()) {
|
2017-09-24 00:01:43 +00:00
|
|
|
const archive = `${getDistPath()}/${getProductName()}.app`
|
2017-06-19 08:55:02 +00:00
|
|
|
try {
|
|
|
|
console.log('validating signature of Desktop app')
|
|
|
|
cp.execSync(`codesign -dv --verbose=4 '${archive}'`)
|
|
|
|
} catch (err) {
|
|
|
|
process.exit(1)
|
|
|
|
}
|
2017-06-19 15:02:19 +00:00
|
|
|
console.log('\n\n')
|
2017-06-19 08:55:02 +00:00
|
|
|
}
|
2017-01-25 12:19:27 +00:00
|
|
|
|
2017-06-06 11:33:37 +00:00
|
|
|
const output = cp.execSync('git config -l --show-origin', { encoding: 'utf-8' })
|
2017-06-19 15:02:19 +00:00
|
|
|
console.log(`Git config:\n${output}\n\n`)
|
2017-06-06 11:33:37 +00:00
|
|
|
|
2017-07-26 19:27:18 +00:00
|
|
|
// delete existing log files
|
|
|
|
getLogFiles().forEach(file => {
|
|
|
|
console.log(`deleting ${file}`)
|
|
|
|
fs.unlinkSync(file)
|
|
|
|
})
|