github-desktop/script/test-setup.ts

29 lines
867 B
TypeScript
Raw Normal View History

2017-10-19 23:04:47 +00:00
/* eslint-disable no-sync */
2017-07-26 19:00:57 +00:00
import * as fs from 'fs'
import * as cp from 'child_process'
import { getLogFiles } from './review-logs'
2017-11-20 01:30:16 +00:00
import { getProductName } from '../app/package-info'
import { getDistPath, isPublishable } from './dist-info'
2020-08-25 12:51:11 +00:00
import { isGitHubActions } from './build-platforms'
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`
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')
}
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`)
// delete existing log files
getLogFiles().forEach(file => {
console.log(`deleting ${file}`)
fs.unlinkSync(file)
})