mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
* Fix initial build breaks from 1.67 merge (#2514) * Update yarn lock files * Update build scripts * Fix tsconfig * Build breaks * WIP * Update yarn lock files * Misc breaks * Updates to package.json * Breaks * Update yarn * Fix breaks * Breaks * Build breaks * Breaks * Breaks * Breaks * Breaks * Breaks * Missing file * Breaks * Breaks * Breaks * Breaks * Breaks * Fix several runtime breaks (#2515) * Missing files * Runtime breaks * Fix proxy ordering issue * Remove commented code * Fix breaks with opening query editor * Fix post merge break * Updates related to setup build and other breaks (#2516) * Fix bundle build issues * Update distro * Fix distro merge and update build JS files * Disable pipeline steps * Remove stats call * Update license name * Make new RPM dependencies a warning * Fix extension manager version checks * Update JS file * Fix a few runtime breaks * Fixes * Fix runtime issues * Fix build breaks * Update notebook tests (part 1) * Fix broken tests * Linting errors * Fix hygiene * Disable lint rules * Bump distro * Turn off smoke tests * Disable integration tests * Remove failing "activate" test * Remove failed test assertion * Disable other broken test * Disable query history tests * Disable extension unit tests * Disable failing tasks
96 lines
4.5 KiB
JavaScript
96 lines
4.5 KiB
JavaScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
'use strict';
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const es = require("event-stream");
|
|
const vfs = require("vinyl-fs");
|
|
const merge = require("gulp-merge-json");
|
|
const gzip = require("gulp-gzip");
|
|
const identity_1 = require("@azure/identity");
|
|
const azure = require('gulp-azure-storage');
|
|
const commit = process.env['VSCODE_DISTRO_COMMIT'] || process.env['BUILD_SOURCEVERSION'];
|
|
const credential = new identity_1.ClientSecretCredential(process.env['AZURE_TENANT_ID'], process.env['AZURE_CLIENT_ID'], process.env['AZURE_CLIENT_SECRET']);
|
|
function main() {
|
|
return new Promise((c, e) => {
|
|
es.merge(vfs.src('out-vscode-web-min/nls.metadata.json', { base: 'out-vscode-web-min' }), vfs.src('.build/extensions/**/nls.metadata.json', { base: '.build/extensions' }), vfs.src('.build/extensions/**/nls.metadata.header.json', { base: '.build/extensions' }), vfs.src('.build/extensions/**/package.nls.json', { base: '.build/extensions' }))
|
|
.pipe(merge({
|
|
fileName: 'combined.nls.metadata.json',
|
|
jsonSpace: '',
|
|
edit: (parsedJson, file) => {
|
|
let key;
|
|
if (file.base === 'out-vscode-web-min') {
|
|
return { vscode: parsedJson };
|
|
}
|
|
// Handle extensions and follow the same structure as the Core nls file.
|
|
switch (file.basename) {
|
|
case 'package.nls.json':
|
|
// put package.nls.json content in Core NlsMetadata format
|
|
// language packs use the key "package" to specify that
|
|
// translations are for the package.json file
|
|
parsedJson = {
|
|
messages: {
|
|
package: Object.values(parsedJson)
|
|
},
|
|
keys: {
|
|
package: Object.keys(parsedJson)
|
|
},
|
|
bundles: {
|
|
main: ['package']
|
|
}
|
|
};
|
|
break;
|
|
case 'nls.metadata.header.json':
|
|
parsedJson = { header: parsedJson };
|
|
break;
|
|
case 'nls.metadata.json': {
|
|
// put nls.metadata.json content in Core NlsMetadata format
|
|
const modules = Object.keys(parsedJson);
|
|
const json = {
|
|
keys: {},
|
|
messages: {},
|
|
bundles: {
|
|
main: []
|
|
}
|
|
};
|
|
for (const module of modules) {
|
|
json.messages[module] = parsedJson[module].messages;
|
|
json.keys[module] = parsedJson[module].keys;
|
|
json.bundles.main.push(module);
|
|
}
|
|
parsedJson = json;
|
|
break;
|
|
}
|
|
}
|
|
key = 'vscode.' + file.relative.split('/')[0];
|
|
return { [key]: parsedJson };
|
|
},
|
|
}))
|
|
.pipe(gzip({ append: false }))
|
|
.pipe(vfs.dest('./nlsMetadata'))
|
|
.pipe(es.through(function (data) {
|
|
console.log(`Uploading ${data.path}`);
|
|
// trigger artifact upload
|
|
console.log(`##vso[artifact.upload containerfolder=nlsmetadata;artifactname=combined.nls.metadata.json]${data.path}`);
|
|
this.emit('data', data);
|
|
}))
|
|
.pipe(azure.upload({
|
|
account: process.env.AZURE_STORAGE_ACCOUNT,
|
|
credential,
|
|
container: 'nlsmetadata',
|
|
prefix: commit + '/',
|
|
contentSettings: {
|
|
contentEncoding: 'gzip',
|
|
cacheControl: 'max-age=31536000, public'
|
|
}
|
|
}))
|
|
.on('end', () => c())
|
|
.on('error', (err) => e(err));
|
|
});
|
|
}
|
|
main().catch(err => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
});
|