generate and upload electron.d.ts with each release
This commit is contained in:
parent
a686237d9b
commit
9a10486514
4 changed files with 11 additions and 0 deletions
|
@ -81,6 +81,10 @@ def main():
|
|||
sys.stderr.write('\nRunning `npm run lint`\n')
|
||||
sys.stderr.flush()
|
||||
execute([npm, 'run', 'lint'])
|
||||
|
||||
sys.stderr.write('\nRunning `npm run generate-typescript-definitions`\n')
|
||||
sys.stderr.flush()
|
||||
execute([npm, 'run', 'generate-typescript-definitions'])
|
||||
if is_release:
|
||||
run_script('build.py', ['-c', 'R'])
|
||||
run_script('create-dist.py')
|
||||
|
|
|
@ -92,6 +92,7 @@ def main():
|
|||
|
||||
if PLATFORM != 'win32' and not args.no_api_docs:
|
||||
create_api_json_schema()
|
||||
copy_typescript_definitions()
|
||||
|
||||
if PLATFORM == 'linux':
|
||||
strip_binaries()
|
||||
|
@ -144,6 +145,9 @@ def create_api_json_schema():
|
|||
'--version={}'.format(ELECTRON_VERSION.replace('v', ''))],
|
||||
env=env)
|
||||
|
||||
def copy_typescript_definitions():
|
||||
shutil.copy2(os.path.join(SOURCE_ROOT, 'out', 'electron.d.ts'), DIST_DIR)
|
||||
|
||||
def strip_binaries():
|
||||
for binary in TARGET_BINARIES[PLATFORM]:
|
||||
if binary.endswith('.so') or '.' not in binary:
|
||||
|
|
|
@ -81,6 +81,7 @@ def main():
|
|||
if PLATFORM == 'darwin':
|
||||
upload_electron(github, release, os.path.join(DIST_DIR,
|
||||
'electron-api.json'))
|
||||
upload_electron(github, release, os.path.join(DIST_DIR, 'electron.d.ts'))
|
||||
upload_electron(github, release, os.path.join(DIST_DIR, DSYM_NAME))
|
||||
elif PLATFORM == 'win32':
|
||||
upload_electron(github, release, os.path.join(DIST_DIR, PDB_NAME))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue