mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -17,6 +17,7 @@ function yarnInstall(location, opts) {
|
||||
opts.cwd = location;
|
||||
opts.stdio = 'inherit';
|
||||
|
||||
console.log('Installing dependencies in \'%s\'.', location);
|
||||
const result = cp.spawnSync(yarn, ['install'], opts);
|
||||
|
||||
if (result.error || result.status !== 0) {
|
||||
|
||||
@@ -7,8 +7,8 @@ let err = false;
|
||||
|
||||
const majorNodeVersion = parseInt(/^(\d+)\./.exec(process.versions.node)[1]);
|
||||
|
||||
if (majorNodeVersion < 8 || majorNodeVersion >= 9) {
|
||||
console.error('\033[1;31m*** Please use node >=8 and <9.\033[0;0m');
|
||||
if (majorNodeVersion < 8 || majorNodeVersion >= 11) {
|
||||
console.error('\033[1;31m*** Please use node >=8 and <11.\033[0;0m');
|
||||
err = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,6 +120,28 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
|
||||
|
||||
try {
|
||||
fs.writeFileSync(dest, JSON.stringify(result, null, '\t').replace(/\n/g, '\r\n'));
|
||||
// Add commit sha to cgmanifest
|
||||
let cgmanifestRead = JSON.parse(fs.readFileSync('./cgmanifest.json').toString());
|
||||
let promises = new Array();
|
||||
let packageJsonPath = 'https://raw.githubusercontent.com/' + repoId + `/${info.commitSha}/package.json`;
|
||||
for (let i = 0; i < cgmanifestRead.registrations.length; i++) {
|
||||
if (cgmanifestRead.registrations[i].component.git.repositoryUrl.substr(cgmanifestRead.registrations[i].component.git.repositoryUrl.length - repoId.length, repoId.length) === repoId) {
|
||||
cgmanifestRead.registrations[i].component.git.commitHash = info.commitSha;
|
||||
promises.push(download(packageJsonPath).then(function (packageJson) {
|
||||
if (packageJson) {
|
||||
try {
|
||||
cgmanifestRead.registrations[i].version = JSON.parse(packageJson).version;
|
||||
} catch (e) {
|
||||
console.log('File does not exist at' + packageJsonPath);
|
||||
}
|
||||
}
|
||||
}));
|
||||
break;
|
||||
}
|
||||
}
|
||||
Promise.all(promises).then(function (allResult) {
|
||||
fs.writeFileSync('./cgmanifest.json', JSON.stringify(cgmanifestRead, null, '\t').replace(/\n/g, '\r\n'));
|
||||
});
|
||||
if (info) {
|
||||
console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user