mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 09:35:41 -05:00
* Initial VS Code 1.21 file copy with patches * A few more merges * Post npm install * Fix batch of build breaks * Fix more build breaks * Fix more build errors * Fix more build breaks * Runtime fixes 1 * Get connection dialog working with some todos * Fix a few packaging issues * Copy several node_modules to package build to fix loader issues * Fix breaks from master * A few more fixes * Make tests pass * First pass of license header updates * Second pass of license header updates * Fix restore dialog issues * Remove add additional themes menu items * fix select box issues where the list doesn't show up * formatting * Fix editor dispose issue * Copy over node modules to correct location on all platforms
44 lines
1.4 KiB
JavaScript
44 lines
1.4 KiB
JavaScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
const cp = require('child_process');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
function updateGrammar(location) {
|
|
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
const result = cp.spawnSync(npm, ['run', 'update-grammar'], {
|
|
cwd: location,
|
|
stdio: 'inherit'
|
|
});
|
|
|
|
if (result.error || result.status !== 0) {
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
const allExtensionFolders = fs.readdirSync('extensions');
|
|
const extensions = allExtensionFolders.filter(e => {
|
|
try {
|
|
let packageJSON = JSON.parse(fs.readFileSync(path.join('extensions', e, 'package.json')).toString());
|
|
return packageJSON && packageJSON.scripts && packageJSON.scripts['update-grammar'];
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
});
|
|
|
|
console.log(`Updating ${extensions.length} grammars...`);
|
|
|
|
extensions.forEach(extension => updateGrammar(`extensions/${extension}`));
|
|
|
|
// run integration tests
|
|
|
|
if (process.platform === 'win32') {
|
|
cp.spawn('.\scripts\test-integration.bat', [], { env: process.env, stdio: 'inherit' });
|
|
} else {
|
|
cp.spawn('/bin/bash', ['./scripts/test-integration.sh'], { env: process.env, stdio: 'inherit' });
|
|
}
|
|
|