build: convert all release scripts to typescript (#44060)
* build: run gha on tag not branch (#42490) * build: convert all release scripts to typescript (#44035) * build: convert all release scripts to typescript * fix test imports * build: fix version bumper export * refactor: use as const * spec: fix bad type spec * build: use ts-node to spawn the version-bumper (#44057) Missed this in the tsification, we should probably call this via API instead of spawning a sub-proc? * build: still colors
This commit is contained in:
parent
956677b66a
commit
2e84985439
22 changed files with 1173 additions and 779 deletions
|
@ -2,8 +2,6 @@ import { Octokit } from '@octokit/rest';
|
|||
import * as fs from 'node:fs';
|
||||
import { createGitHubTokenStrategy } from '../github-token';
|
||||
|
||||
if (!process.env.CI) require('dotenv-safe').load();
|
||||
|
||||
if (process.argv.length < 6) {
|
||||
console.log('Usage: upload-to-github filePath fileName releaseId');
|
||||
process.exit(1);
|
||||
|
|
|
@ -385,12 +385,12 @@ def upload_sha256_checksum(version, file_path, key_prefix=None):
|
|||
|
||||
def get_release(version):
|
||||
script_path = os.path.join(
|
||||
ELECTRON_DIR, 'script', 'release', 'find-github-release.js')
|
||||
ELECTRON_DIR, 'script', 'release', 'find-github-release.ts')
|
||||
|
||||
# Strip warnings from stdout to ensure the only output is the desired object
|
||||
release_env = os.environ.copy()
|
||||
release_env['NODE_NO_WARNINGS'] = '1'
|
||||
release_info = execute(['node', script_path, version], release_env)
|
||||
release_info = execute([TS_NODE, script_path, version], release_env)
|
||||
if is_verbose_mode():
|
||||
print(f'Release info for version: {version}:\n')
|
||||
print(release_info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue