mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Run our build scripts directly as typescript (#277567)
* Run our build scripts directly as typescript #277567 Follow up on #276864 For #277526 * Remove a few more ts-node references * Fix linux and script reference * Remove `_build-script` ref * Fix script missing closing quote * use type only import * Fix export * Make sure to run copy-policy-dto * Make sure we run the copy-policy-dto script * Enable `verbatimModuleSyntax` * Pipelines fixes * Try adding explicit ext to path * Fix bad edit * Revert extra `--` --------- Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
This commit is contained in:
@@ -9,12 +9,12 @@ import fs from 'fs';
|
||||
import https from 'https';
|
||||
import path from 'path';
|
||||
import { createHash } from 'crypto';
|
||||
import { DebianArchString } from './types';
|
||||
import type { DebianArchString } from './types.ts';
|
||||
|
||||
// Based on https://source.chromium.org/chromium/chromium/src/+/main:build/linux/sysroot_scripts/install-sysroot.py.
|
||||
const URL_PREFIX = 'https://msftelectronbuild.z5.web.core.windows.net';
|
||||
const URL_PATH = 'sysroots/toolchain';
|
||||
const REPO_ROOT = path.dirname(path.dirname(path.dirname(__dirname)));
|
||||
const REPO_ROOT = path.dirname(path.dirname(path.dirname(import.meta.dirname)));
|
||||
|
||||
const ghApiHeaders: Record<string, string> = {
|
||||
Accept: 'application/vnd.github.v3+json',
|
||||
@@ -188,7 +188,7 @@ export async function getChromiumSysroot(arch: DebianArchString): Promise<string
|
||||
if (result.status !== 0) {
|
||||
throw new Error('Cannot retrieve sysroots.json. Stderr:\n' + result.stderr);
|
||||
}
|
||||
const sysrootInfo = require(sysrootDictLocation);
|
||||
const sysrootInfo = JSON.parse(fs.readFileSync(sysrootDictLocation, 'utf8'));
|
||||
const sysrootArch = `bullseye_${arch}`;
|
||||
const sysrootDict: SysrootDictEntry = sysrootInfo[sysrootArch];
|
||||
const tarballFilename = sysrootDict['Tarball'];
|
||||
|
||||
Reference in New Issue
Block a user