mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)
* Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d * Fix vs unit tests and hygiene issue * Fix strict null check issue
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as cp from 'child_process';
|
||||
import * as path from 'path';
|
||||
|
||||
function yarnInstall(packageName: string): void {
|
||||
cp.execSync(`yarn add --no-lockfile ${packageName}`);
|
||||
cp.execSync(`yarn add --no-lockfile ${packageName}`, { cwd: path.join( process.cwd(), 'remote') });
|
||||
}
|
||||
|
||||
const product = require('../../../product.json');
|
||||
const dependencies = product.dependencies || {} as { [name: string]: string; };
|
||||
|
||||
Object.keys(dependencies).forEach(name => {
|
||||
const url = dependencies[name];
|
||||
yarnInstall(url);
|
||||
});
|
||||
38
build/azure-pipelines/common/installDistroDependencies.ts
Normal file
38
build/azure-pipelines/common/installDistroDependencies.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as cp from 'child_process';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
function yarnInstall(packageName: string, cwd: string): void {
|
||||
console.log(`yarn add --no-lockfile ${packageName}`, cwd);
|
||||
cp.execSync(`yarn add --no-lockfile ${packageName}`, { cwd, stdio: 'inherit' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Install additional dependencies listed on each quality `package.json` file.
|
||||
*/
|
||||
function main() {
|
||||
const quality = process.env['VSCODE_QUALITY'];
|
||||
|
||||
if (!quality) {
|
||||
throw new Error('Missing VSCODE_QUALITY, can\'t install distro');
|
||||
}
|
||||
|
||||
const rootPath = path.dirname(path.dirname(path.dirname(__dirname)));
|
||||
const qualityPath = path.join(rootPath, 'quality', quality);
|
||||
const packagePath = path.join(qualityPath, 'package.json');
|
||||
const pkg = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
|
||||
const dependencies = pkg.dependencies || {} as { [name: string]: string; };
|
||||
|
||||
Object.keys(dependencies).forEach(name => {
|
||||
const url = dependencies[name];
|
||||
const cwd = process.argv.length < 3 ? process.cwd() : path.join(process.cwd(), process.argv[2]);
|
||||
yarnInstall(url, cwd);
|
||||
});
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -36,7 +36,6 @@ export interface IVersionAccessor extends IApplicationAccessor {
|
||||
enum Platform {
|
||||
WIN_32 = 'win32-ia32',
|
||||
WIN_64 = 'win32-x64',
|
||||
LINUX_32 = 'linux-ia32',
|
||||
LINUX_64 = 'linux-x64',
|
||||
MAC_OS = 'darwin-x64'
|
||||
}
|
||||
@@ -191,7 +190,7 @@ if (process.platform === 'darwin') {
|
||||
} else if (process.platform === 'win32') {
|
||||
platform = is64 ? Platform.WIN_64 : Platform.WIN_32;
|
||||
} else {
|
||||
platform = is64 ? Platform.LINUX_64 : Platform.LINUX_32;
|
||||
platform = Platform.LINUX_64;
|
||||
}
|
||||
|
||||
// Create version and upload symbols in HockeyApp
|
||||
|
||||
Reference in New Issue
Block a user