forked from electron/electron
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: check patches on update (electron#23103)
- Loading branch information
1 parent
a252aa5
commit b298235
Showing
4 changed files
with
56 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const { spawnSync } = require('child_process'); | ||
const path = require('path'); | ||
const { inspect } = require('util'); | ||
|
||
const srcPath = path.resolve(__dirname, '..', '..', '..'); | ||
const patchExportFnPath = path.resolve(__dirname, 'export_all_patches.py'); | ||
const configPath = path.resolve(__dirname, '..', 'patches', 'config.json'); | ||
|
||
// Re-export all the patches to check if there were changes. | ||
const proc = spawnSync('python', [patchExportFnPath, configPath, '--dry-run'], { | ||
cwd: srcPath | ||
}); | ||
|
||
// Fail if patch exporting returned 1, e.g dry run failed. | ||
if (proc.status === 1) { | ||
console.log(proc.stderr.toString('utf8')); | ||
process.exit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters