Reland "fix: use electron-osx-sign instead of manual code signing (#97582)" (#98145)

This reverts commit f291767f09.
This commit is contained in:
Robo
2020-05-20 01:06:15 -07:00
committed by GitHub
parent 452dc54c78
commit d5372eb159
13 changed files with 247 additions and 41 deletions

View File

@@ -18,6 +18,8 @@ import * as VinylFile from 'vinyl';
import { ThroughStream } from 'through';
import * as sm from 'source-map';
const root = path.dirname(path.dirname(__dirname));
export interface ICancellationToken {
isCancellationRequested(): boolean;
}
@@ -318,3 +320,9 @@ export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise<void> {
stream.on('end', () => c());
});
}
export function getElectronVersion(): string {
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
const target = /^target "(.*)"$/m.exec(yarnrc)![1];
return target;
}