eng - add build version of node.js to `.yarnrc` (#185302)
* eng - add build version of node.js to `.yarnrc`
* 🆙 distro
This commit is contained in:
Родитель
0e9c2fa760
Коммит
518a183762
|
@ -125,8 +125,9 @@ const serverWithWebEntryPoints = [
|
|||
|
||||
function getNodeVersion() {
|
||||
const yarnrc = fs.readFileSync(path.join(REPO_ROOT, 'remote', '.yarnrc'), 'utf8');
|
||||
const target = /^target "(.*)"$/m.exec(yarnrc)[1];
|
||||
return target;
|
||||
const nodeVersion = /^target "(.*)"$/m.exec(yarnrc)[1];
|
||||
const internalNodeVersion = /^ms_build_id "(.*)"$/m.exec(yarnrc)[1];
|
||||
return { nodeVersion, internalNodeVersion };
|
||||
}
|
||||
|
||||
function getNodeChecksum(nodeVersion, platform, arch) {
|
||||
|
@ -156,7 +157,7 @@ function getNodeChecksum(nodeVersion, platform, arch) {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
const nodeVersion = getNodeVersion();
|
||||
const { nodeVersion, internalNodeVersion } = getNodeVersion();
|
||||
|
||||
BUILD_TARGETS.forEach(({ platform, arch }) => {
|
||||
gulp.task(task.define(`node-${platform}-${arch}`, () => {
|
||||
|
@ -193,7 +194,7 @@ function nodejs(platform, arch) {
|
|||
arch = 'x64';
|
||||
}
|
||||
|
||||
log(`Downloading node.js ${nodeVersion} ${platform} ${arch} from ${product.nodejs.repository}...`);
|
||||
log(`Downloading node.js ${nodeVersion} ${platform} ${arch} from ${product.nodejsRepository}...`);
|
||||
|
||||
const checksumSha256 = getNodeChecksum(nodeVersion, platform, arch);
|
||||
|
||||
|
@ -205,14 +206,14 @@ function nodejs(platform, arch) {
|
|||
|
||||
switch (platform) {
|
||||
case 'win32':
|
||||
return (product.nodejs.repository !== 'https://nodejs.org' ?
|
||||
fetchGithub(product.nodejs.repository, { version: product.nodejs.version, name: `win-${arch}-node.exe`, checksumSha256 }) :
|
||||
return (product.nodejsRepository !== 'https://nodejs.org' ?
|
||||
fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `win-${arch}-node.exe`, checksumSha256 }) :
|
||||
fetchUrls(`/dist/v${nodeVersion}/win-${arch}/node.exe`, { base: 'https://nodejs.org', checksumSha256 }))
|
||||
.pipe(rename('node.exe'));
|
||||
case 'darwin':
|
||||
case 'linux':
|
||||
return (product.nodejs.repository !== 'https://nodejs.org' ?
|
||||
fetchGithub(product.nodejs.repository, { version: product.nodejs.version, name: `node-v${nodeVersion}-${platform}-${arch}.tar.gz`, checksumSha256 }) :
|
||||
return (product.nodejsRepository !== 'https://nodejs.org' ?
|
||||
fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: `node-v${nodeVersion}-${platform}-${arch}.tar.gz`, checksumSha256 }) :
|
||||
fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 })
|
||||
).pipe(flatmap(stream => stream.pipe(gunzip()).pipe(untar())))
|
||||
.pipe(filter('**/node'))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "code-oss-dev",
|
||||
"version": "1.80.0",
|
||||
"distro": "a44605dbeeed7ad5c41513260004329c4f502793",
|
||||
"distro": "94a4bd29af2fe03e39c7867fdca1b2e27fed3a39",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
|
@ -230,4 +230,4 @@
|
|||
"optionalDependencies": {
|
||||
"windows-foreground-love": "0.5.0"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -30,6 +30,7 @@
|
|||
"linuxIconName": "code-oss",
|
||||
"licenseFileName": "LICENSE.txt",
|
||||
"reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
|
||||
"nodejsRepository": "https://nodejs.org",
|
||||
"urlProtocol": "code-oss",
|
||||
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/",
|
||||
"builtInExtensions": [
|
||||
|
@ -81,9 +82,5 @@
|
|||
"publisherDisplayName": "Microsoft"
|
||||
}
|
||||
}
|
||||
],
|
||||
"nodejs": {
|
||||
"repository": "https://nodejs.org",
|
||||
"version": "16.17.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
disturl "http://nodejs.org/dist"
|
||||
target "16.17.1"
|
||||
ms_build_id "20230714"
|
||||
runtime "node"
|
||||
build_from_source "true"
|
||||
|
|
Загрузка…
Ссылка в новой задаче