mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
xcodebuild and codesign during safari dist task
This commit is contained in:
15
gulpfile.js
15
gulpfile.js
@@ -160,11 +160,22 @@ function edgeCopyAssets(source, dest) {
|
|||||||
|
|
||||||
function distSafari(cb) {
|
function distSafari(cb) {
|
||||||
const buildPath = paths.dist + 'Safari/';
|
const buildPath = paths.dist + 'Safari/';
|
||||||
|
const builtAppexPath = buildPath + 'build/Release/safari.appex';
|
||||||
|
const entitlementsPath = paths.safari + 'safari/safari.entitlements';
|
||||||
|
const devId = 'Developer ID Application: 8bit Solutions LLC';
|
||||||
|
|
||||||
return del([buildPath + '**/*'])
|
return del([buildPath + '**/*'])
|
||||||
.then(() => safariCopyAssets(paths.safari + '**/*', buildPath))
|
.then(() => safariCopyAssets(paths.safari + '**/*', buildPath))
|
||||||
.then(() => safariCopyBuild(paths.build + '**/*', buildPath + 'safari/app'))
|
.then(() => safariCopyBuild(paths.build + '**/*', buildPath + 'safari/app'))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
const proc = child.spawn('xcodebuild', ['-project', buildPath + 'desktop.xcodeproj', '-target', 'safari', '-configuration', 'Release']);
|
||||||
|
stdOutProc(proc);
|
||||||
|
return new Promise((resolve) => proc.on('close', resolve));
|
||||||
|
}).then(() => {
|
||||||
|
const proc = child.spawn('codesign', ['--verbose', '--force', '-o', 'runtime', '--sign', devId, '--entitlements', entitlementsPath, builtAppexPath]);
|
||||||
|
stdOutProc(proc);
|
||||||
|
return new Promise((resolve) => proc.on('close', resolve));
|
||||||
|
}).then(() => {
|
||||||
return cb;
|
return cb;
|
||||||
}, () => {
|
}, () => {
|
||||||
return cb;
|
return cb;
|
||||||
@@ -192,6 +203,10 @@ function safariCopyBuild(source, dest) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function stdOutProc(proc) {
|
||||||
|
proc.stdout.on('data', (data) => console.log(data.toString()));
|
||||||
|
proc.stderr.on('data', (data) => console.error(data.toString()));}
|
||||||
|
|
||||||
function webfonts() {
|
function webfonts() {
|
||||||
return gulp.src('./webfonts.list')
|
return gulp.src('./webfonts.list')
|
||||||
.pipe(googleWebFonts({
|
.pipe(googleWebFonts({
|
||||||
|
|||||||
Reference in New Issue
Block a user