mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -12,6 +12,7 @@ const gulptslint = require('gulp-tslint');
|
||||
const gulpeslint = require('gulp-eslint');
|
||||
const tsfmt = require('typescript-formatter');
|
||||
const tslint = require('tslint');
|
||||
const vfs = require('vinyl-fs');
|
||||
|
||||
/**
|
||||
* Hygiene works by creating cascading subsets of all our files and
|
||||
@@ -53,6 +54,7 @@ const indentationFilter = [
|
||||
'!**/*.md',
|
||||
'!**/*.ps1',
|
||||
'!**/*.template',
|
||||
'!**/*.yaml',
|
||||
'!**/*.yml',
|
||||
'!**/lib/**',
|
||||
'!extensions/**/*.d.ts',
|
||||
@@ -92,6 +94,7 @@ const copyrightFilter = [
|
||||
'!**/*.opts',
|
||||
'!**/*.disabled',
|
||||
'!build/**/*.init',
|
||||
'!resources/linux/snap/snapcraft.yaml',
|
||||
'!resources/win32/bin/code.js',
|
||||
'!extensions/markdown/media/tomorrow.css',
|
||||
'!extensions/html/server/src/modes/typescript/*'
|
||||
@@ -141,7 +144,7 @@ function reportFailures(failures) {
|
||||
}
|
||||
|
||||
gulp.task('eslint', () => {
|
||||
return gulp.src(all, { base: '.' })
|
||||
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
||||
.pipe(filter(eslintFilter))
|
||||
.pipe(gulpeslint('src/.eslintrc'))
|
||||
.pipe(gulpeslint.formatEach('compact'))
|
||||
@@ -151,7 +154,7 @@ gulp.task('eslint', () => {
|
||||
gulp.task('tslint', () => {
|
||||
const options = { summarizeFailureOutput: true };
|
||||
|
||||
return gulp.src(all, { base: '.' })
|
||||
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
||||
.pipe(filter(tslintFilter))
|
||||
.pipe(gulptslint({ rulesDirectory: 'build/lib/tslint' }))
|
||||
.pipe(gulptslint.report(reportFailures, options));
|
||||
@@ -232,7 +235,7 @@ const hygiene = exports.hygiene = (some, options) => {
|
||||
this.emit('data', file);
|
||||
});
|
||||
|
||||
const result = gulp.src(some || all, { base: '.' })
|
||||
const result = vfs.src(some || all, { base: '.', follow: true, allowEmpty: true })
|
||||
.pipe(filter(f => !f.stat.isDirectory()))
|
||||
.pipe(filter(eolFilter))
|
||||
// {{SQL CARBON EDIT}}
|
||||
@@ -267,7 +270,7 @@ const hygiene = exports.hygiene = (some, options) => {
|
||||
}));
|
||||
};
|
||||
|
||||
gulp.task('hygiene', () => hygiene());
|
||||
gulp.task('hygiene', () => hygiene(''));
|
||||
|
||||
// this allows us to run hygiene as a git pre-commit hook
|
||||
if (require.main === module) {
|
||||
|
||||
@@ -17,7 +17,6 @@ gulp.task('clean-client', util.rimraf('dataprotocol-node/client/node_modules'));
|
||||
gulp.task('clean-jsonrpc', util.rimraf('dataprotocol-node/jsonrpc/node_modules'));
|
||||
gulp.task('clean-server', util.rimraf('dataprotocol-node/server/node_modules'));
|
||||
gulp.task('clean-types', util.rimraf('dataprotocol-node/types/node_modules'));
|
||||
// {{SQL CARBON EDIT}}
|
||||
gulp.task('clean-extensions-modules', util.rimraf('extensions-modules/node_modules'));
|
||||
gulp.task('clean-protocol', ['clean-extensions-modules', 'clean-mssql-extension', 'clean-credentials-extension', 'clean-client', 'clean-jsonrpc', 'clean-server', 'clean-types']);
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
const gulp = require('gulp');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const cp = require('child_process');
|
||||
const path = require('path');
|
||||
const es = require('event-stream');
|
||||
const azure = require('gulp-azure-storage');
|
||||
@@ -47,17 +49,15 @@ const nodeModules = [
|
||||
'rxjs/Observable',
|
||||
'rxjs/Subject',
|
||||
'rxjs/Observer',
|
||||
'ng2-charts/ng2-charts',
|
||||
'rangy/lib/rangy-textrange']
|
||||
'ng2-charts/ng2-charts']
|
||||
.concat(dependencies)
|
||||
.concat(baseModules);
|
||||
|
||||
|
||||
// Build
|
||||
|
||||
const builtInExtensions = [
|
||||
{ name: 'ms-vscode.node-debug', version: '1.16.10' },
|
||||
{ name: 'ms-vscode.node-debug2', version: '1.16.9' }
|
||||
{ name: 'ms-vscode.node-debug', version: '1.18.3' },
|
||||
{ name: 'ms-vscode.node-debug2', version: '1.18.5' }
|
||||
];
|
||||
|
||||
const excludedExtensions = [
|
||||
@@ -168,7 +168,7 @@ const config = {
|
||||
role: 'Editor',
|
||||
ostypes: ["TEXT", "utxt", "TUTX", "****"],
|
||||
// {{SQL CARBON EDIT}}
|
||||
extensions: ["csv", "json", "showplan", "sql", "xml"],
|
||||
extensions: ["csv", "json", "sqlplan", "sql", "xml"],
|
||||
iconFile: 'resources/darwin/code_file.icns'
|
||||
}],
|
||||
darwinBundleURLTypes: [{
|
||||
@@ -304,9 +304,10 @@ function packageTask(platform, arch, opts) {
|
||||
const packageJsonStream = gulp.src(['package.json'], { base: '.' })
|
||||
.pipe(json({ name, version }));
|
||||
|
||||
const settingsSearchBuildId = getBuildNumber();
|
||||
const date = new Date().toISOString();
|
||||
const productJsonStream = gulp.src(['product.json'], { base: '.' })
|
||||
.pipe(json({ commit, date, checksums }));
|
||||
.pipe(json({ commit, date, checksums, settingsSearchBuildId }));
|
||||
|
||||
const license = gulp.src(['LICENSES.chromium.html', 'LICENSE.txt', 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.' });
|
||||
|
||||
@@ -315,13 +316,10 @@ function packageTask(platform, arch, opts) {
|
||||
// TODO the API should be copied to `out` during compile, not here
|
||||
const api = gulp.src('src/vs/vscode.d.ts').pipe(rename('out/vs/vscode.d.ts'));
|
||||
// {{SQL CARBON EDIT}}
|
||||
const dataApi = gulp.src('src/vs/data.d.ts').pipe(rename('out/sql/data.d.ts'));
|
||||
const dataApi = gulp.src('src/vs/data.d.ts').pipe(rename('out/sql/data.d.ts'));
|
||||
|
||||
const depsSrc = _.flatten(dependencies
|
||||
.map(function (d) { return ['node_modules/' + d + '/**',
|
||||
'!node_modules/' + d + '/**/{test,tests}/**',
|
||||
'!node_modules/' + d + '/**/test.*',
|
||||
'!node_modules/' + d + '/**/*.test.*']; }));
|
||||
.map(function (d) { return ['node_modules/' + d + '/**', '!node_modules/' + d + '/**/{test,tests}/**']; }));
|
||||
|
||||
const deps = gulp.src(depsSrc, { base: '.', dot: true })
|
||||
.pipe(filter(['**', '!**/package-lock.json']))
|
||||
@@ -335,6 +333,7 @@ function packageTask(platform, arch, opts) {
|
||||
.pipe(util.cleanNodeModule('windows-process-tree', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
||||
.pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js']))
|
||||
.pipe(util.cleanNodeModule('v8-profiler', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js']))
|
||||
.pipe(util.cleanNodeModule('keytar', ['binding.gyp', 'build/**', 'src/**', 'script/**', 'node_modules/**'], ['**/*.node']))
|
||||
.pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**']))
|
||||
.pipe(util.cleanNodeModule('nsfw', ['binding.gyp', 'build/**', 'src/**', 'openpa/**', 'includes/**'], ['**/*.node', '**/*.a']))
|
||||
.pipe(util.cleanNodeModule('vsda', ['binding.gyp', 'README.md', 'build/**', '*.bat', '*.sh', '*.cpp', '*.h'], ['build/Release/vsda.node']));
|
||||
@@ -352,7 +351,7 @@ function packageTask(platform, arch, opts) {
|
||||
);
|
||||
|
||||
if (platform === 'win32') {
|
||||
all = es.merge(all, gulp.src('resources/win32/code_file.ico', { base: '.' }));
|
||||
all = es.merge(all, gulp.src(['resources/win32/code_file.ico', 'resources/win32/code_70x70.png', 'resources/win32/code_150x150.png'], { base: '.' }));
|
||||
} else if (platform === 'linux') {
|
||||
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
|
||||
} else if (platform === 'darwin') {
|
||||
@@ -378,6 +377,9 @@ function packageTask(platform, arch, opts) {
|
||||
result = es.merge(result, gulp.src('resources/win32/bin/code.sh', { base: 'resources/win32' })
|
||||
.pipe(replace('@@NAME@@', product.nameShort))
|
||||
.pipe(rename(function (f) { f.basename = product.applicationName; f.extname = ''; })));
|
||||
|
||||
result = es.merge(result, gulp.src('resources/win32/VisualElementsManifest.xml', { base: 'resources/win32' })
|
||||
.pipe(rename(product.nameShort + '.VisualElementsManifest.xml')));
|
||||
} else if (platform === 'linux') {
|
||||
result = es.merge(result, gulp.src('resources/linux/bin/code.sh', { base: '.' })
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
@@ -482,6 +484,139 @@ gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => {
|
||||
}));
|
||||
});
|
||||
|
||||
const allConfigDetailsPath = path.join(os.tmpdir(), 'configuration.json');
|
||||
gulp.task('upload-vscode-configuration', ['generate-vscode-configuration'], () => {
|
||||
const branch = process.env.BUILD_SOURCEBRANCH;
|
||||
if (!branch.endsWith('/master') && !branch.indexOf('/release/') >= 0) {
|
||||
console.log(`Only runs on master and release branches, not ${branch}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fs.existsSync(allConfigDetailsPath)) {
|
||||
console.error(`configuration file at ${allConfigDetailsPath} does not exist`);
|
||||
return;
|
||||
}
|
||||
|
||||
const settingsSearchBuildId = getBuildNumber();
|
||||
if (!settingsSearchBuildId) {
|
||||
console.error('Failed to compute build number');
|
||||
return;
|
||||
}
|
||||
|
||||
return gulp.src(allConfigDetailsPath)
|
||||
.pipe(azure.upload({
|
||||
account: process.env.AZURE_STORAGE_ACCOUNT,
|
||||
key: process.env.AZURE_STORAGE_ACCESS_KEY,
|
||||
container: 'configuration',
|
||||
prefix: `${settingsSearchBuildId}/${commit}/`
|
||||
}));
|
||||
});
|
||||
|
||||
function getBuildNumber() {
|
||||
const previous = getPreviousVersion(packageJson.version);
|
||||
if (!previous) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
try {
|
||||
const out = cp.execSync(`git rev-list ${previous}..HEAD --count`);
|
||||
const count = parseInt(out.toString());
|
||||
return versionStringToNumber(packageJson.version) * 1e4 + count;
|
||||
} catch (e) {
|
||||
console.error('Could not determine build number: ' + e.toString());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Given 1.17.2, return 1.17.1
|
||||
* 1.18.0 => 1.17.2.
|
||||
* 2.0.0 => 1.18.0 (or the highest 1.x)
|
||||
*/
|
||||
function getPreviousVersion(versionStr) {
|
||||
function tagExists(tagName) {
|
||||
try {
|
||||
cp.execSync(`git rev-parse ${tagName}`, { stdio: 'ignore' });
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function getLastTagFromBase(semverArr, componentToTest) {
|
||||
const baseVersion = semverArr.join('.');
|
||||
if (!tagExists(baseVersion)) {
|
||||
console.error('Failed to find tag for base version, ' + baseVersion);
|
||||
return null;
|
||||
}
|
||||
|
||||
let goodTag;
|
||||
do {
|
||||
goodTag = semverArr.join('.');
|
||||
semverArr[componentToTest]++;
|
||||
} while (tagExists(semverArr.join('.')));
|
||||
|
||||
return goodTag;
|
||||
}
|
||||
|
||||
const semverArr = versionStr.split('.');
|
||||
if (semverArr[2] > 0) {
|
||||
semverArr[2]--;
|
||||
return semverArr.join('.');
|
||||
} else if (semverArr[1] > 0) {
|
||||
semverArr[1]--;
|
||||
return getLastTagFromBase(semverArr, 2);
|
||||
} else {
|
||||
semverArr[0]--;
|
||||
return getLastTagFromBase(semverArr, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function versionStringToNumber(versionStr) {
|
||||
const semverRegex = /(\d+)\.(\d+)\.(\d+)/;
|
||||
const match = versionStr.match(semverRegex);
|
||||
if (!match) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return parseInt(match[1], 10) * 1e4 + parseInt(match[2], 10) * 1e2 + parseInt(match[3], 10);
|
||||
}
|
||||
|
||||
gulp.task('generate-vscode-configuration', () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const buildDir = process.env['AGENT_BUILDDIRECTORY'];
|
||||
if (!buildDir) {
|
||||
return reject(new Error('$AGENT_BUILDDIRECTORY not set'));
|
||||
}
|
||||
|
||||
const userDataDir = path.join(os.tmpdir(), 'tmpuserdata');
|
||||
const extensionsDir = path.join(os.tmpdir(), 'tmpextdir');
|
||||
const appPath = path.join(buildDir, 'VSCode-darwin/Visual\\ Studio\\ Code\\ -\\ Insiders.app/Contents/Resources/app/bin/code');
|
||||
const codeProc = cp.exec(`${appPath} --export-default-configuration='${allConfigDetailsPath}' --wait --user-data-dir='${userDataDir}' --extensions-dir='${extensionsDir}'`);
|
||||
|
||||
const timer = setTimeout(() => {
|
||||
codeProc.kill();
|
||||
reject(new Error('export-default-configuration process timed out'));
|
||||
}, 10 * 1000);
|
||||
|
||||
codeProc.stdout.on('data', d => console.log(d.toString()));
|
||||
codeProc.stderr.on('data', d => console.log(d.toString()));
|
||||
|
||||
codeProc.on('exit', () => {
|
||||
clearTimeout(timer);
|
||||
resolve();
|
||||
});
|
||||
|
||||
codeProc.on('error', err => {
|
||||
clearTimeout(timer);
|
||||
reject(err);
|
||||
});
|
||||
}).catch(e => {
|
||||
// Don't fail the build
|
||||
console.error(e.toString());
|
||||
});
|
||||
});
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// Install service locally before building carbon
|
||||
|
||||
@@ -506,3 +641,5 @@ gulp.task('install-sqltoolsservice', () => {
|
||||
var extObj = new mssqlExt.Constants();
|
||||
return installService(extObj);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ function prepareDebPackage(arch) {
|
||||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@ICON@@', product.applicationName))
|
||||
.pipe(rename('usr/share/applications/' + product.applicationName + '.desktop'));
|
||||
|
||||
const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' })
|
||||
@@ -133,6 +134,7 @@ function prepareRpmPackage(arch) {
|
||||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@ICON@@', product.applicationName))
|
||||
.pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '.desktop'));
|
||||
|
||||
const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' })
|
||||
@@ -180,6 +182,50 @@ function buildRpmPackage(arch) {
|
||||
'cp "' + rpmOut + '/$(ls ' + rpmOut + ')" ' + destination + '/'
|
||||
]);
|
||||
}
|
||||
function getSnapBuildPath(arch) {
|
||||
return `.build/linux/snap/${arch}/${product.applicationName}-${arch}`;
|
||||
}
|
||||
|
||||
function prepareSnapPackage(arch) {
|
||||
const binaryDir = '../VSCode-linux-' + arch;
|
||||
const destination = getSnapBuildPath(arch);
|
||||
|
||||
return function () {
|
||||
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
|
||||
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
||||
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@ICON@@', `/usr/share/pixmaps/${product.applicationName}.png`))
|
||||
.pipe(rename(`usr/share/applications/${product.applicationName}.desktop`));
|
||||
|
||||
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
||||
.pipe(rename(`usr/share/pixmaps/${product.applicationName}.png`));
|
||||
|
||||
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
||||
.pipe(rename(function (p) { p.dirname = 'usr/share/' + product.applicationName + '/' + p.dirname; }));
|
||||
|
||||
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@VERSION@@', packageJson.version))
|
||||
.pipe(rename('snap/snapcraft.yaml'));
|
||||
|
||||
const electronLaunch = gulp.src('resources/linux/snap/electron-launch', { base: '.' })
|
||||
.pipe(rename('electron-launch'));
|
||||
|
||||
const all = es.merge(desktop, icon, code, snapcraft, electronLaunch);
|
||||
|
||||
return all.pipe(vfs.dest(destination));
|
||||
};
|
||||
}
|
||||
|
||||
function buildSnapPackage(arch) {
|
||||
const snapBuildPath = getSnapBuildPath(arch);
|
||||
|
||||
return shell.task([
|
||||
`chmod +x ${snapBuildPath}/electron-launch`,
|
||||
`cd ${snapBuildPath} && snapcraft snap`
|
||||
]);
|
||||
}
|
||||
|
||||
function getFlatpakArch(arch) {
|
||||
return { x64: 'x86_64', ia32: 'i386', arm: 'arm' }[arch];
|
||||
@@ -261,6 +307,12 @@ gulp.task('clean-vscode-linux-arm-deb', util.rimraf('.build/linux/deb/armhf'));
|
||||
gulp.task('clean-vscode-linux-ia32-rpm', util.rimraf('.build/linux/rpm/i386'));
|
||||
gulp.task('clean-vscode-linux-x64-rpm', util.rimraf('.build/linux/rpm/x86_64'));
|
||||
gulp.task('clean-vscode-linux-arm-rpm', util.rimraf('.build/linux/rpm/armhf'));
|
||||
gulp.task('clean-vscode-linux-ia32-snap', util.rimraf('.build/linux/snap/x64'));
|
||||
gulp.task('clean-vscode-linux-x64-snap', util.rimraf('.build/linux/snap/x64'));
|
||||
gulp.task('clean-vscode-linux-arm-snap', util.rimraf('.build/linux/snap/x64'));
|
||||
gulp.task('clean-vscode-linux-ia32-flatpak', util.rimraf('.build/linux/flatpak/i386'));
|
||||
gulp.task('clean-vscode-linux-x64-flatpak', util.rimraf('.build/linux/flatpak/x86_64'));
|
||||
gulp.task('clean-vscode-linux-arm-flatpak', util.rimraf('.build/linux/flatpak/arm'));
|
||||
|
||||
gulp.task('vscode-linux-ia32-prepare-deb', ['clean-vscode-linux-ia32-deb'], prepareDebPackage('ia32'));
|
||||
gulp.task('vscode-linux-x64-prepare-deb', ['clean-vscode-linux-x64-deb'], prepareDebPackage('x64'));
|
||||
@@ -276,14 +328,16 @@ gulp.task('vscode-linux-ia32-build-rpm', ['vscode-linux-ia32-prepare-rpm'], buil
|
||||
gulp.task('vscode-linux-x64-build-rpm', ['vscode-linux-x64-prepare-rpm'], buildRpmPackage('x64'));
|
||||
gulp.task('vscode-linux-arm-build-rpm', ['vscode-linux-arm-prepare-rpm'], buildRpmPackage('arm'));
|
||||
|
||||
gulp.task('clean-vscode-linux-ia32-flatpak', util.rimraf('.build/linux/flatpak/i386'));
|
||||
gulp.task('clean-vscode-linux-x64-flatpak', util.rimraf('.build/linux/flatpak/x86_64'));
|
||||
gulp.task('clean-vscode-linux-arm-flatpak', util.rimraf('.build/linux/flatpak/arm'));
|
||||
gulp.task('vscode-linux-ia32-prepare-snap', ['clean-vscode-linux-ia32-snap'], prepareSnapPackage('ia32'));
|
||||
gulp.task('vscode-linux-x64-prepare-snap', ['clean-vscode-linux-x64-snap'], prepareSnapPackage('x64'));
|
||||
gulp.task('vscode-linux-arm-prepare-snap', ['clean-vscode-linux-arm-snap'], prepareSnapPackage('arm'));
|
||||
gulp.task('vscode-linux-ia32-build-snap', ['vscode-linux-ia32-prepare-snap'], buildSnapPackage('ia32'));
|
||||
gulp.task('vscode-linux-x64-build-snap', ['vscode-linux-x64-prepare-snap'], buildSnapPackage('x64'));
|
||||
gulp.task('vscode-linux-arm-build-snap', ['vscode-linux-arm-prepare-snap'], buildSnapPackage('arm'));
|
||||
|
||||
gulp.task('vscode-linux-ia32-prepare-flatpak', ['clean-vscode-linux-ia32-flatpak'], prepareFlatpak('ia32'));
|
||||
gulp.task('vscode-linux-x64-prepare-flatpak', ['clean-vscode-linux-x64-flatpak'], prepareFlatpak('x64'));
|
||||
gulp.task('vscode-linux-arm-prepare-flatpak', ['clean-vscode-linux-arm-flatpak'], prepareFlatpak('arm'));
|
||||
|
||||
gulp.task('vscode-linux-ia32-flatpak', ['vscode-linux-ia32-prepare-flatpak'], buildFlatpak('ia32'));
|
||||
gulp.task('vscode-linux-x64-flatpak', ['vscode-linux-x64-prepare-flatpak'], buildFlatpak('x64'));
|
||||
gulp.task('vscode-linux-arm-flatpak', ['vscode-linux-arm-prepare-flatpak'], buildFlatpak('arm'));
|
||||
|
||||
@@ -64,7 +64,7 @@ var ModuleJsonFormat;
|
||||
}
|
||||
ModuleJsonFormat.is = is;
|
||||
})(ModuleJsonFormat || (ModuleJsonFormat = {}));
|
||||
var Line = (function () {
|
||||
var Line = /** @class */ (function () {
|
||||
function Line(indent) {
|
||||
if (indent === void 0) { indent = 0; }
|
||||
this.indent = indent;
|
||||
@@ -83,7 +83,7 @@ var Line = (function () {
|
||||
return Line;
|
||||
}());
|
||||
exports.Line = Line;
|
||||
var TextModel = (function () {
|
||||
var TextModel = /** @class */ (function () {
|
||||
function TextModel(contents) {
|
||||
this._lines = contents.split(/\r\n|\r|\n/);
|
||||
}
|
||||
@@ -96,7 +96,7 @@ var TextModel = (function () {
|
||||
});
|
||||
return TextModel;
|
||||
}());
|
||||
var XLF = (function () {
|
||||
var XLF = /** @class */ (function () {
|
||||
function XLF(project) {
|
||||
this.project = project;
|
||||
this.buffer = [];
|
||||
|
||||
@@ -130,10 +130,6 @@
|
||||
"name": "vs/workbench/parts/update",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/parts/views",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/parts/watermark",
|
||||
"project": "vscode-workbench"
|
||||
@@ -190,9 +186,17 @@
|
||||
"name": "vs/workbench/services/textMate",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/workspace",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/decorations",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "setup_messages",
|
||||
"project": "vscode-workbench"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ function isImportNode(node) {
|
||||
return { line: position.line - 1, character: position.column };
|
||||
}
|
||||
nls_1.lcFrom = lcFrom;
|
||||
var SingleFileServiceHost = (function () {
|
||||
var SingleFileServiceHost = /** @class */ (function () {
|
||||
function SingleFileServiceHost(options, filename, contents) {
|
||||
var _this = this;
|
||||
this.options = options;
|
||||
@@ -161,7 +161,7 @@ function isImportNode(node) {
|
||||
// `localize` named imports
|
||||
var allLocalizeImportDeclarations = importDeclarations
|
||||
.filter(function (d) { return d.importClause.namedBindings.kind === ts.SyntaxKind.NamedImports; })
|
||||
.map(function (d) { return d.importClause.namedBindings.elements; })
|
||||
.map(function (d) { return [].concat(d.importClause.namedBindings.elements); })
|
||||
.flatten();
|
||||
// `localize` read-only references
|
||||
var localizeReferences = allLocalizeImportDeclarations
|
||||
@@ -200,7 +200,7 @@ function isImportNode(node) {
|
||||
};
|
||||
}
|
||||
nls_1.analyze = analyze;
|
||||
var TextModel = (function () {
|
||||
var TextModel = /** @class */ (function () {
|
||||
function TextModel(contents) {
|
||||
var regex = /\r\n|\r|\n/g;
|
||||
var index = 0;
|
||||
|
||||
@@ -227,7 +227,7 @@ module nls {
|
||||
// `localize` named imports
|
||||
const allLocalizeImportDeclarations = importDeclarations
|
||||
.filter(d => d.importClause.namedBindings.kind === ts.SyntaxKind.NamedImports)
|
||||
.map(d => (<ts.NamedImports>d.importClause.namedBindings).elements)
|
||||
.map(d => [].concat((<ts.NamedImports>d.importClause.namedBindings).elements))
|
||||
.flatten();
|
||||
|
||||
// `localize` read-only references
|
||||
|
||||
@@ -54,7 +54,7 @@ function log() {
|
||||
function createReporter() {
|
||||
var errors = [];
|
||||
allErrors.push(errors);
|
||||
var ReportFunc = (function () {
|
||||
var ReportFunc = /** @class */ (function () {
|
||||
function ReportFunc(err) {
|
||||
errors.push(err);
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var ts = require("typescript");
|
||||
var Lint = require("tslint");
|
||||
var Rule = (function (_super) {
|
||||
__extends(Rule, _super);
|
||||
function Rule() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Rule.prototype.apply = function (sourceFile) {
|
||||
var allowed = this.getOptions().ruleArguments[0];
|
||||
return this.applyWithWalker(new AsyncRuleWalker(sourceFile, this.getOptions(), allowed));
|
||||
};
|
||||
return Rule;
|
||||
}(Lint.Rules.AbstractRule));
|
||||
exports.Rule = Rule;
|
||||
var AsyncRuleWalker = (function (_super) {
|
||||
__extends(AsyncRuleWalker, _super);
|
||||
function AsyncRuleWalker(file, opts, allowed) {
|
||||
var _this = _super.call(this, file, opts) || this;
|
||||
_this.allowed = allowed;
|
||||
return _this;
|
||||
}
|
||||
AsyncRuleWalker.prototype.visitMethodDeclaration = function (node) {
|
||||
this.visitFunctionLikeDeclaration(node);
|
||||
};
|
||||
AsyncRuleWalker.prototype.visitFunctionDeclaration = function (node) {
|
||||
this.visitFunctionLikeDeclaration(node);
|
||||
};
|
||||
AsyncRuleWalker.prototype.visitFunctionLikeDeclaration = function (node) {
|
||||
var _this = this;
|
||||
var flags = ts.getCombinedModifierFlags(node);
|
||||
if (!(flags & ts.ModifierFlags.Async)) {
|
||||
return;
|
||||
}
|
||||
var path = node.getSourceFile().path;
|
||||
var pathParts = path.split(/\\|\//);
|
||||
if (pathParts.some(function (part) { return _this.allowed.some(function (allowed) { return part === allowed; }); })) {
|
||||
return;
|
||||
}
|
||||
var message = "You are not allowed to use async function in this layer. Allowed layers are: [" + this.allowed + "]";
|
||||
this.addFailureAtNode(node, message);
|
||||
};
|
||||
return AsyncRuleWalker;
|
||||
}(Lint.RuleWalker));
|
||||
@@ -1,47 +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 ts from 'typescript';
|
||||
import * as Lint from 'tslint';
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
const allowed = this.getOptions().ruleArguments[0] as string[];
|
||||
return this.applyWithWalker(new AsyncRuleWalker(sourceFile, this.getOptions(), allowed));
|
||||
}
|
||||
}
|
||||
|
||||
class AsyncRuleWalker extends Lint.RuleWalker {
|
||||
|
||||
constructor(file: ts.SourceFile, opts: Lint.IOptions, private allowed: string[]) {
|
||||
super(file, opts);
|
||||
}
|
||||
|
||||
protected visitMethodDeclaration(node: ts.MethodDeclaration): void {
|
||||
this.visitFunctionLikeDeclaration(node);
|
||||
}
|
||||
|
||||
protected visitFunctionDeclaration(node: ts.FunctionDeclaration): void {
|
||||
this.visitFunctionLikeDeclaration(node);
|
||||
}
|
||||
|
||||
private visitFunctionLikeDeclaration(node: ts.FunctionLikeDeclaration) {
|
||||
const flags = ts.getCombinedModifierFlags(node);
|
||||
|
||||
if (!(flags & ts.ModifierFlags.Async)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const path = (node.getSourceFile() as any).path;
|
||||
const pathParts = path.split(/\\|\//);
|
||||
|
||||
if (pathParts.some(part => this.allowed.some(allowed => part === allowed))) {
|
||||
return;
|
||||
}
|
||||
|
||||
const message = `You are not allowed to use async function in this layer. Allowed layers are: [${this.allowed}]`;
|
||||
this.addFailureAtNode(node, message);
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var path_1 = require("path");
|
||||
var Lint = require("tslint");
|
||||
var Rule = (function (_super) {
|
||||
var Rule = /** @class */ (function (_super) {
|
||||
__extends(Rule, _super);
|
||||
function Rule() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
@@ -27,7 +27,7 @@ var Rule = (function (_super) {
|
||||
return Rule;
|
||||
}(Lint.Rules.AbstractRule));
|
||||
exports.Rule = Rule;
|
||||
var ImportPatterns = (function (_super) {
|
||||
var ImportPatterns = /** @class */ (function (_super) {
|
||||
__extends(ImportPatterns, _super);
|
||||
function ImportPatterns(file, opts) {
|
||||
var _this = _super.call(this, file, opts) || this;
|
||||
|
||||
@@ -18,7 +18,7 @@ var ts = require("typescript");
|
||||
var Lint = require("tslint");
|
||||
var minimatch = require("minimatch");
|
||||
var path_1 = require("path");
|
||||
var Rule = (function (_super) {
|
||||
var Rule = /** @class */ (function (_super) {
|
||||
__extends(Rule, _super);
|
||||
function Rule() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
@@ -36,7 +36,7 @@ var Rule = (function (_super) {
|
||||
return Rule;
|
||||
}(Lint.Rules.AbstractRule));
|
||||
exports.Rule = Rule;
|
||||
var ImportPatterns = (function (_super) {
|
||||
var ImportPatterns = /** @class */ (function (_super) {
|
||||
__extends(ImportPatterns, _super);
|
||||
function ImportPatterns(file, opts, _config) {
|
||||
var _this = _super.call(this, file, opts) || this;
|
||||
|
||||
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var ts = require("typescript");
|
||||
var Lint = require("tslint");
|
||||
var path_1 = require("path");
|
||||
var Rule = (function (_super) {
|
||||
var Rule = /** @class */ (function (_super) {
|
||||
__extends(Rule, _super);
|
||||
function Rule() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
@@ -48,7 +48,7 @@ var Rule = (function (_super) {
|
||||
return Rule;
|
||||
}(Lint.Rules.AbstractRule));
|
||||
exports.Rule = Rule;
|
||||
var LayeringRule = (function (_super) {
|
||||
var LayeringRule = /** @class */ (function (_super) {
|
||||
__extends(LayeringRule, _super);
|
||||
function LayeringRule(file, config, opts) {
|
||||
var _this = _super.call(this, file, opts) || this;
|
||||
|
||||
@@ -19,7 +19,7 @@ var Lint = require("tslint");
|
||||
/**
|
||||
* Implementation of the no-unexternalized-strings rule.
|
||||
*/
|
||||
var Rule = (function (_super) {
|
||||
var Rule = /** @class */ (function (_super) {
|
||||
__extends(Rule, _super);
|
||||
function Rule() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
@@ -39,7 +39,7 @@ function isObjectLiteral(node) {
|
||||
function isPropertyAssignment(node) {
|
||||
return node && node.kind === ts.SyntaxKind.PropertyAssignment;
|
||||
}
|
||||
var NoUnexternalizedStringsRuleWalker = (function (_super) {
|
||||
var NoUnexternalizedStringsRuleWalker = /** @class */ (function (_super) {
|
||||
__extends(NoUnexternalizedStringsRuleWalker, _super);
|
||||
function NoUnexternalizedStringsRuleWalker(file, opts) {
|
||||
var _this = _super.call(this, file, opts) || this;
|
||||
|
||||
@@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var Lint = require("tslint");
|
||||
var fs = require("fs");
|
||||
var Rule = (function (_super) {
|
||||
var Rule = /** @class */ (function (_super) {
|
||||
__extends(Rule, _super);
|
||||
function Rule() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
@@ -27,7 +27,7 @@ var Rule = (function (_super) {
|
||||
return Rule;
|
||||
}(Lint.Rules.AbstractRule));
|
||||
exports.Rule = Rule;
|
||||
var TranslationRemindRuleWalker = (function (_super) {
|
||||
var TranslationRemindRuleWalker = /** @class */ (function (_super) {
|
||||
__extends(TranslationRemindRuleWalker, _super);
|
||||
function TranslationRemindRuleWalker(file, opts) {
|
||||
return _super.call(this, file, opts) || this;
|
||||
|
||||
@@ -67,7 +67,7 @@ function fixWin32DirectoryPermissions() {
|
||||
exports.fixWin32DirectoryPermissions = fixWin32DirectoryPermissions;
|
||||
function setExecutableBit(pattern) {
|
||||
var setBit = es.mapSync(function (f) {
|
||||
f.stat.mode = 33261;
|
||||
f.stat.mode = /* 100755 */ 33261;
|
||||
return f;
|
||||
});
|
||||
if (!pattern) {
|
||||
|
||||
@@ -19,14 +19,15 @@ function handleDeletions() {
|
||||
|
||||
let watch = void 0;
|
||||
|
||||
if (!process.env['VSCODE_USE_LEGACY_WATCH']) {
|
||||
try {
|
||||
watch = require('./watch-nsfw');
|
||||
} catch (err) {
|
||||
console.warn('Could not load our cross platform file watcher: ' + err.toString());
|
||||
console.warn('Falling back to our platform specific watcher...');
|
||||
}
|
||||
}
|
||||
// Disabled due to https://github.com/Microsoft/vscode/issues/36214
|
||||
// if (!process.env['VSCODE_USE_LEGACY_WATCH']) {
|
||||
// try {
|
||||
// watch = require('./watch-nsfw');
|
||||
// } catch (err) {
|
||||
// console.warn('Could not load our cross platform file watcher: ' + err.toString());
|
||||
// console.warn('Falling back to our platform specific watcher...');
|
||||
// }
|
||||
// }
|
||||
|
||||
if (!watch) {
|
||||
watch = process.platform === 'win32' ? require('./watch-win32') : require('gulp-watch');
|
||||
|
||||
@@ -11,4 +11,4 @@ a good page describing the code editor's features is [here](https://code.visuals
|
||||
This npm module contains the core editor functionality, as it comes from the [vscode repository](https://github.com/Microsoft/vscode).
|
||||
|
||||
## License
|
||||
[Source EULA](https://github.com/Microsoft/sqlopsstudio/blob/master/LICENSE.txt)
|
||||
[MIT](https://github.com/Microsoft/vscode/blob/master/LICENSE.txt)
|
||||
|
||||
@@ -16,7 +16,7 @@ Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Source EULA
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
@@ -32,7 +32,7 @@ END OF winjs NOTICES AND INFORMATION
|
||||
|
||||
%% string_scorer version 0.1.20 (https://github.com/joshaven/string_score)
|
||||
=========================================
|
||||
This software is released under the Source EULA:
|
||||
This software is released under the MIT license:
|
||||
|
||||
Copyright (c) Joshaven Potter
|
||||
|
||||
@@ -60,7 +60,7 @@ END OF string_scorer NOTICES AND INFORMATION
|
||||
|
||||
%% chjj-marked NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The Source EULA License
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ declare module monaco {
|
||||
|
||||
#include(vs/base/common/winjs.base.d.ts): TValueCallback, ProgressCallback, Promise
|
||||
#include(vs/base/common/cancellation): CancellationTokenSource, CancellationToken
|
||||
#include(vs/base/common/uri): URI
|
||||
#include(vs/base/common/uri): URI, UriComponents
|
||||
#include(vs/editor/common/standalone/standaloneBase): KeyCode, KeyMod
|
||||
#include(vs/base/common/htmlContent): IMarkdownString
|
||||
#include(vs/base/browser/keyboardEvent): IKeyboardEvent
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
"url": "https://github.com/Microsoft/vscode/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/minimist": "^1.2.0",
|
||||
"@types/mocha": "^2.2.39",
|
||||
"@types/semver": "^5.3.30",
|
||||
"@types/sinon": "^1.16.34",
|
||||
"@types/minimist": "1.2.0",
|
||||
"@types/mocha": "2.2.39",
|
||||
"@types/semver": "5.3.30",
|
||||
"@types/sinon": "1.16.34",
|
||||
"debounce": "^1.0.0",
|
||||
"eslint": "^3.4.0",
|
||||
"event-stream": "^3.1.7",
|
||||
@@ -48,7 +48,7 @@
|
||||
"sinon": "^1.17.2",
|
||||
"source-map": "^0.4.4",
|
||||
"tslint": "^4.3.1",
|
||||
"typescript": "2.4.1",
|
||||
"typescript": "2.5.2",
|
||||
"typescript-formatter": "4.0.1",
|
||||
"underscore": "^1.8.2",
|
||||
"vinyl": "^0.4.5",
|
||||
|
||||
@@ -19,6 +19,7 @@ function npmInstall(location, opts) {
|
||||
}
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
const protocol = [
|
||||
'jsonrpc',
|
||||
'types',
|
||||
|
||||
@@ -54,7 +54,7 @@ const extensions = [
|
||||
'scss',
|
||||
'shaderlab',
|
||||
'shellscript',
|
||||
// 'sql', customized, PRs pending
|
||||
'sql',
|
||||
'swift',
|
||||
'typescript',
|
||||
'vb',
|
||||
|
||||
@@ -22,7 +22,7 @@ function getOptions(urlString) {
|
||||
headers: {
|
||||
'User-Agent': 'NodeJS'
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function download(url, redirectCount) {
|
||||
@@ -100,7 +100,9 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) {
|
||||
result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha;
|
||||
}
|
||||
for (let key in grammar) {
|
||||
result[key] = grammar[key];
|
||||
if (!result.hasOwnProperty(key)) {
|
||||
result[key] = grammar[key];
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -116,7 +118,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) {
|
||||
});
|
||||
|
||||
}, console.error);
|
||||
}
|
||||
};
|
||||
|
||||
if (path.basename(process.argv[1]) === 'update-grammar.js') {
|
||||
for (var i = 3; i < process.argv.length; i += 2) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "code-oss-dev-build",
|
||||
"name": "sqlops-oss-dev-build",
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"@types/azure": "^0.9.18",
|
||||
"@types/documentdb": "^1.10.1",
|
||||
"@types/es6-collections": "^0.5.30",
|
||||
"@types/es6-promise": "0.0.32",
|
||||
"@types/azure": "0.9.19",
|
||||
"@types/documentdb": "1.10.2",
|
||||
"@types/es6-collections": "0.5.31",
|
||||
"@types/es6-promise": "0.0.33",
|
||||
"@types/mime": "0.0.29",
|
||||
"@types/node": "^7.0.13",
|
||||
"@types/xml2js": "^0.0.33",
|
||||
"@types/node": "8.0.33",
|
||||
"@types/xml2js": "0.0.33",
|
||||
"azure-storage": "^2.1.0",
|
||||
"decompress": "^4.2.0",
|
||||
"documentdb": "^1.11.0",
|
||||
@@ -16,8 +16,8 @@
|
||||
"fs-extra-promise": "^1.0.1",
|
||||
"mime": "^1.3.4",
|
||||
"minimist": "^1.2.0",
|
||||
"typescript": "2.4.1",
|
||||
"vscode": "^1.0.1",
|
||||
"typescript": "2.5.2",
|
||||
"vscode": "^1.0.1",
|
||||
"xml2js": "^0.4.17"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -52,20 +52,20 @@ function isBuildSigned(quality: string, commit: string): Promise<boolean> {
|
||||
});
|
||||
}
|
||||
|
||||
async function waitForSignedBuild(quality: string, commit: string): Promise<void> {
|
||||
let retries = 0;
|
||||
// async function waitForSignedBuild(quality: string, commit: string): Promise<void> {
|
||||
// let retries = 0;
|
||||
|
||||
while (retries < 180) {
|
||||
if (await isBuildSigned(quality, commit)) {
|
||||
return;
|
||||
}
|
||||
// while (retries < 180) {
|
||||
// if (await isBuildSigned(quality, commit)) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
await new Promise<void>(c => setTimeout(c, 10000));
|
||||
retries++;
|
||||
}
|
||||
// await new Promise<void>(c => setTimeout(c, 10000));
|
||||
// retries++;
|
||||
// }
|
||||
|
||||
throw new Error('Timed out waiting for signed build');
|
||||
}
|
||||
// throw new Error('Timed out waiting for signed build');
|
||||
// }
|
||||
|
||||
async function main(quality: string): Promise<void> {
|
||||
const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim();
|
||||
@@ -73,10 +73,10 @@ async function main(quality: string): Promise<void> {
|
||||
console.log(`Queueing signing request for '${quality}/${commit}'...`);
|
||||
await queueSigningRequest(quality, commit);
|
||||
|
||||
console.log('Waiting on signed build...');
|
||||
await waitForSignedBuild(quality, commit);
|
||||
// console.log('Waiting on signed build...');
|
||||
// await waitForSignedBuild(quality, commit);
|
||||
|
||||
console.log('Found signed build!');
|
||||
// console.log('Found signed build!');
|
||||
}
|
||||
|
||||
main(process.argv[2]).catch(err => {
|
||||
|
||||
@@ -68,6 +68,7 @@ interface Asset {
|
||||
mooncakeUrl: string;
|
||||
hash: string;
|
||||
sha256hash: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
function createOrUpdate(commit: string, quality: string, platform: string, type: string, release: NewDocument, asset: Asset, isUpdate: boolean): Promise<void> {
|
||||
@@ -156,7 +157,7 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
|
||||
console.log('Publishing...');
|
||||
console.log('Quality:', quality);
|
||||
console.log('Platforn:', platform);
|
||||
console.log('Platform:', platform);
|
||||
console.log('Type:', type);
|
||||
console.log('Name:', name);
|
||||
console.log('Version:', version);
|
||||
@@ -165,6 +166,11 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
console.log('Is Released:', isReleased);
|
||||
console.log('File:', file);
|
||||
|
||||
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
|
||||
const size = stat.size;
|
||||
|
||||
console.log('Size:', size);
|
||||
|
||||
const stream = fs.createReadStream(file);
|
||||
const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]);
|
||||
|
||||
@@ -224,7 +230,8 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
|
||||
mooncakeUrl: `${process.env['MOONCAKE_CDN_URL']}/${quality}/${blobName}`,
|
||||
hash: sha1hash,
|
||||
sha256hash
|
||||
sha256hash,
|
||||
size
|
||||
};
|
||||
|
||||
const release = {
|
||||
|
||||
@@ -37,5 +37,19 @@ step "Run unit tests" \
|
||||
step "Run integration tests" \
|
||||
./scripts/test-integration.sh
|
||||
|
||||
# function smoketest {
|
||||
# ARTIFACTS="$AGENT_BUILDDIRECTORY/smoketest-artifacts"
|
||||
# rm -rf $ARTIFACTS
|
||||
|
||||
# [[ "$VSCODE_QUALITY" == "insider" ]] && VSCODE_APPNAME="Visual Studio Code - Insiders" || VSCODE_APPNAME="Visual Studio Code"
|
||||
# npm run smoketest -- --build "$AGENT_BUILDDIRECTORY/VSCode-darwin/$VSCODE_APPNAME.app" --log $ARTIFACTS
|
||||
# }
|
||||
|
||||
# step "Run smoke test" \
|
||||
# smoketest
|
||||
|
||||
step "Publish release" \
|
||||
./build/tfs/darwin/release.sh
|
||||
|
||||
step "Generate and upload configuration.json" \
|
||||
npm run gulp -- upload-vscode-configuration
|
||||
|
||||
@@ -20,7 +20,7 @@ rm -rf $UNSIGNEDZIP
|
||||
zip -r -X -y $UNSIGNEDZIP *)
|
||||
|
||||
step "Upload unsigned archive" \
|
||||
node build/tfs/common/publish.js --upload-only $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP
|
||||
node build/tfs/common/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP
|
||||
|
||||
step "Sign build" \
|
||||
node build/tfs/common/enqueue.js $VSCODE_QUALITY
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./build/tfs/common/node.sh
|
||||
. ./scripts/env.sh
|
||||
. ./build/tfs/common/common.sh
|
||||
|
||||
export VSCODE_MIXIN_PASSWORD="$1"
|
||||
VSO_PAT="$2"
|
||||
|
||||
echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc
|
||||
|
||||
step "Install dependencies" \
|
||||
npm install
|
||||
|
||||
step "Mix in repository from vscode-distro" \
|
||||
npm run gulp -- mixin
|
||||
|
||||
step "Install distro dependencies" \
|
||||
node build/tfs/common/installDistro.js
|
||||
|
||||
step "Build minified & upload source maps" \
|
||||
npm run gulp -- vscode-darwin-min
|
||||
|
||||
step "Run smoke test" \
|
||||
pushd test/smoke
|
||||
npm install
|
||||
npm test -- --latest "$AGENT_BUILDDIRECTORY/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/MacOS/Electron"
|
||||
popd
|
||||
@@ -39,5 +39,22 @@ step "Build minified" \
|
||||
step "Run unit tests" \
|
||||
./scripts/test.sh --build --reporter dot
|
||||
|
||||
# function smoketest {
|
||||
# id -u testuser &>/dev/null || (useradd -m testuser; chpasswd <<< testuser:testpassword)
|
||||
# sudo -i -u testuser -- sh -c 'git config --global user.name "VS Code Agent" && git config --global user.email "monacotools@microsoft.com"'
|
||||
|
||||
# ARTIFACTS="$AGENT_BUILDDIRECTORY/smoketest-artifacts"
|
||||
# rm -rf $ARTIFACTS
|
||||
# mkdir -p $ARTIFACTS
|
||||
# chown -R testuser $ARTIFACTS
|
||||
|
||||
# ps -o pid= -u testuser | xargs sudo kill -9
|
||||
# DISPLAY=:10 sudo -i -u testuser -- sh -c "cd $BUILD_SOURCESDIRECTORY/test/smoke && ./node_modules/.bin/mocha --build $AGENT_BUILDDIRECTORY/VSCode-linux-$ARCH --log $ARTIFACTS"
|
||||
# # DISPLAY=:10 sudo -i -u testuser -- sh -c "cd /vso/work/1/s/test/smoke && ./node_modules/.bin/mocha --build /vso/work/1/VSCode-linux-ia32"
|
||||
# }
|
||||
|
||||
# step "Run smoke test" \
|
||||
# smoketest
|
||||
|
||||
step "Publish release" \
|
||||
./build/tfs/linux/release.sh
|
||||
|
||||
@@ -40,6 +40,9 @@ ADD xvfb.init /etc/init.d/xvfb
|
||||
RUN chmod +x /etc/init.d/xvfb
|
||||
RUN update-rc.d xvfb defaults
|
||||
|
||||
# dbus
|
||||
RUN ln -sf /bin/dbus-daemon /usr/bin/dbus-daemon
|
||||
|
||||
# nvm
|
||||
ENV NVM_DIR /usr/local/nvm
|
||||
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
|
||||
@@ -47,4 +50,4 @@ RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | b
|
||||
# for libsecret
|
||||
ENV PKG_CONFIG_PATH /usr/lib/i386-linux-gnu/pkgconfig
|
||||
|
||||
CMD (service xvfb start; export DISPLAY=:10; ./start.sh)
|
||||
CMD (service xvfb start; service dbus start; export DISPLAY=:10; ./start.sh)
|
||||
@@ -9,6 +9,9 @@ step "Build Debian package" \
|
||||
step "Build RPM package" \
|
||||
npm run gulp -- "vscode-linux-$ARCH-build-rpm"
|
||||
|
||||
# step "Build snap package" \
|
||||
# npm run gulp -- "vscode-linux-$ARCH-build-snap"
|
||||
|
||||
(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \
|
||||
step "Install build dependencies" \
|
||||
npm install --unsafe-perm)
|
||||
@@ -49,6 +52,9 @@ RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
|
||||
step "Publish RPM package" \
|
||||
node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH
|
||||
|
||||
# SNAP_FILENAME="$(ls $REPO/.build/linux/snap/$ARCH/ | grep .snap)"
|
||||
# SNAP_PATH="$REPO/.build/linux/snap/$ARCH/$SNAP_FILENAME"
|
||||
|
||||
if [ -z "$VSCODE_QUALITY" ]; then
|
||||
echo "VSCODE_QUALITY is not set, skipping repo package publish"
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
# This is a VERY basic script for Create/Delete operations on repos and packages
|
||||
#
|
||||
#
|
||||
cmd=$1
|
||||
urls=urls.txt
|
||||
defaultPackageFile=new_package.json
|
||||
@@ -53,7 +53,7 @@ function ParseConfigFile {
|
||||
fi
|
||||
BailIfFileMissing "$configFile"
|
||||
secretContents=$(cat "$configFile")
|
||||
|
||||
|
||||
server=$(ParseFromJson .server)
|
||||
protocol=$(ParseFromJson .protocol)
|
||||
port=$(ParseFromJson .port)
|
||||
@@ -135,14 +135,14 @@ function AddPackageByUrl
|
||||
rm -f $tmpFile $tmpOut
|
||||
Bail "File is not a valid deb/rpm package $url"
|
||||
fi
|
||||
|
||||
|
||||
rm -f $tmpFile $tmpOut
|
||||
if [ -z "$pkgName" ]; then
|
||||
Bail "Unable to parse package name for $url"
|
||||
elif [ -z "$pkgVer" ]; then
|
||||
Bail "Unable to parse package version number for $url"
|
||||
fi
|
||||
|
||||
|
||||
# Create Package .json file
|
||||
escapedUrl=$(echo "$url" | sed 's/\//\\\//g' | sed 's/\&/\\\&/g')
|
||||
cp $defaultPackageFile.template $defaultPackageFile
|
||||
@@ -153,7 +153,7 @@ function AddPackageByUrl
|
||||
# Perform Upload
|
||||
AddPackage $defaultPackageFile
|
||||
# Cleanup
|
||||
rm -f $defaultPackageFile
|
||||
rm -f $defaultPackageFile
|
||||
}
|
||||
|
||||
# Upload multiple packages by reading urls line-by-line from the specified file
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
. ./build/tfs/common/node.sh
|
||||
. ./scripts/env.sh
|
||||
. ./build/tfs/common/common.sh
|
||||
|
||||
export ARCH="$1"
|
||||
export VSCODE_MIXIN_PASSWORD="$2"
|
||||
VSO_PAT="$3"
|
||||
|
||||
echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc
|
||||
|
||||
step "Install dependencies" \
|
||||
npm install --arch=$ARCH --unsafe-perm
|
||||
|
||||
step "Mix in repository from vscode-distro" \
|
||||
npm run gulp -- mixin
|
||||
|
||||
step "Get Electron" \
|
||||
npm run gulp -- "electron-$ARCH"
|
||||
|
||||
step "Install distro dependencies" \
|
||||
node build/tfs/common/installDistro.js --arch=$ARCH
|
||||
|
||||
step "Build minified" \
|
||||
npm run gulp -- "vscode-linux-$ARCH-min"
|
||||
|
||||
function configureEnvironment {
|
||||
id -u testuser &>/dev/null || (useradd -m testuser; chpasswd <<< testuser:testpassword)
|
||||
sudo -i -u testuser git config --global user.name "VS Code Agent"
|
||||
sudo -i -u testuser git config --global user.email "monacotools@microsoft.com"
|
||||
chown -R testuser $AGENT_BUILDDIRECTORY
|
||||
}
|
||||
|
||||
function runTest {
|
||||
pushd test/smoke
|
||||
npm install
|
||||
sudo -u testuser -H xvfb-run -a -s "-screen 0 1024x768x8" npm test -- --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders"
|
||||
popd
|
||||
}
|
||||
|
||||
step "Configure environment" configureEnvironment
|
||||
|
||||
step "Run smoke test" runTest
|
||||
|
||||
@@ -36,8 +36,11 @@ ADD xvfb.init /etc/init.d/xvfb
|
||||
RUN chmod +x /etc/init.d/xvfb
|
||||
RUN update-rc.d xvfb defaults
|
||||
|
||||
# dbus
|
||||
RUN ln -sf /bin/dbus-daemon /usr/bin/dbus-daemon
|
||||
|
||||
# nvm
|
||||
ENV NVM_DIR /usr/local/nvm
|
||||
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
|
||||
|
||||
CMD (service xvfb start; export DISPLAY=:10; ./start.sh)
|
||||
CMD (service xvfb start; service dbus start; export DISPLAY=:10; ./start.sh)
|
||||
@@ -52,4 +52,11 @@ step "Run unit tests" {
|
||||
# exec { & .\scripts\test-integration.bat }
|
||||
# }
|
||||
|
||||
# step "Run smoke test" {
|
||||
# $Artifacts = "$env:AGENT_BUILDDIRECTORY\smoketest-artifacts"
|
||||
# Remove-Item -Recurse -Force -ErrorAction Ignore $Artifacts
|
||||
|
||||
# exec { & npm run smoketest -- --build "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch" --log "$Artifacts" }
|
||||
# }
|
||||
|
||||
done
|
||||
|
||||
85
build/tfs/win32/build_unsigned.ps1
Normal file
85
build/tfs/win32/build_unsigned.ps1
Normal file
@@ -0,0 +1,85 @@
|
||||
Param(
|
||||
[string]$arch,
|
||||
[string]$mixinPassword,
|
||||
[string]$vsoPAT,
|
||||
[string]$storageKey,
|
||||
[string]$mooncakeStorageKey,
|
||||
[string]$documentDbKey
|
||||
)
|
||||
|
||||
. .\build\tfs\win32\node.ps1
|
||||
. .\scripts\env.ps1
|
||||
. .\build\tfs\win32\lib.ps1
|
||||
|
||||
# Create a _netrc file to download distro dependencies
|
||||
# In order to get _netrc to work, we need a HOME variable setup
|
||||
"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:HOME\_netrc" -Encoding ASCII
|
||||
|
||||
# Set the right architecture
|
||||
$env:npm_config_arch="$arch"
|
||||
|
||||
step "Install dependencies" {
|
||||
exec { & npm install }
|
||||
}
|
||||
|
||||
step "Hygiene" {
|
||||
exec { & npm run gulp -- hygiene }
|
||||
}
|
||||
|
||||
$env:VSCODE_MIXIN_PASSWORD = $mixinPassword
|
||||
step "Mix in repository from vscode-distro" {
|
||||
exec { & npm run gulp -- mixin }
|
||||
}
|
||||
|
||||
step "Get Electron" {
|
||||
exec { & npm run gulp -- "electron-$global:arch" }
|
||||
}
|
||||
|
||||
step "Install distro dependencies" {
|
||||
exec { & node build\tfs\common\installDistro.js }
|
||||
}
|
||||
|
||||
step "Build minified" {
|
||||
exec { & npm run gulp -- "vscode-win32-$global:arch-min" }
|
||||
}
|
||||
|
||||
step "Run unit tests" {
|
||||
exec { & .\scripts\test.bat --build --reporter dot }
|
||||
}
|
||||
|
||||
step "Run smoke test" {
|
||||
$Artifacts = "$env:AGENT_BUILDDIRECTORY\smoketest-artifacts"
|
||||
Remove-Item -Recurse -Force -ErrorAction Ignore $Artifacts
|
||||
|
||||
exec { & npm run smoketest -- --build "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch" --log "$Artifacts" }
|
||||
}
|
||||
|
||||
step "Create archive and setup package" {
|
||||
exec { & npm run gulp -- "vscode-win32-$global:arch-archive" "vscode-win32-$global:arch-setup" }
|
||||
}
|
||||
|
||||
$Repo = "$(pwd)"
|
||||
$Root = "$Repo\.."
|
||||
$Exe = "$Repo\.build\win32-$arch\setup\VSCodeSetup.exe"
|
||||
$Zip = "$Repo\.build\win32-$arch\archive\VSCode-win32-$arch.zip"
|
||||
$Build = "$Root\VSCode-win32-$arch"
|
||||
|
||||
# get version
|
||||
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
|
||||
$Version = $PackageJson.version
|
||||
$Quality = "$env:VSCODE_QUALITY"
|
||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey
|
||||
$env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey
|
||||
$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey
|
||||
|
||||
$assetPlatform = if ($arch -eq "ia32") { "win32" } else { "win32-x64" }
|
||||
|
||||
step "Publish UNSIGNED archive" {
|
||||
exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive-unsigned "VSCode-win32-$global:arch-$Version-unsigned.zip" $Version false $Zip }
|
||||
}
|
||||
|
||||
step "Publish UNSIGNED setup package" {
|
||||
exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup-unsigned "VSCodeSetup-$global:arch-$Version-unsigned.exe" $Version false $Exe }
|
||||
}
|
||||
|
||||
done
|
||||
@@ -1,47 +0,0 @@
|
||||
Param(
|
||||
[string]$arch,
|
||||
[string]$mixinPassword,
|
||||
[string]$vsoPAT
|
||||
)
|
||||
|
||||
. .\build\tfs\win32\node.ps1
|
||||
. .\scripts\env.ps1
|
||||
. .\build\tfs\win32\lib.ps1
|
||||
|
||||
# Create a _netrc file to download distro dependencies
|
||||
# In order to get _netrc to work, we need a HOME variable setup
|
||||
$env:HOME = $env:USERPROFILE
|
||||
"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
|
||||
|
||||
# Set the right architecture
|
||||
$env:npm_config_arch = "$arch"
|
||||
|
||||
step "Install dependencies" {
|
||||
exec { & npm install }
|
||||
}
|
||||
|
||||
$env:VSCODE_MIXIN_PASSWORD = $mixinPassword
|
||||
step "Mix in repository from vscode-distro" {
|
||||
exec { & npm run gulp -- mixin }
|
||||
}
|
||||
|
||||
step "Get Electron" {
|
||||
exec { & npm run gulp -- "electron-$global:arch" }
|
||||
}
|
||||
|
||||
step "Install distro dependencies" {
|
||||
exec { & node build\tfs\common\installDistro.js }
|
||||
}
|
||||
|
||||
step "Build minified" {
|
||||
exec { & npm run gulp -- "vscode-win32-$global:arch-min" }
|
||||
}
|
||||
|
||||
step "Run smoke test" {
|
||||
exec { & Push-Location test\smoke }
|
||||
exec { & npm install }
|
||||
exec { & npm test -- --latest "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch\Code - Insiders.exe" }
|
||||
exec { & Pop-Location }
|
||||
}
|
||||
|
||||
done
|
||||
@@ -20,6 +20,7 @@ OutputBaseFilename=SqlOpsStudioSetup
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
AppMutex={#AppMutex}
|
||||
SetupMutex={#AppMutex}setup
|
||||
WizardImageFile={#RepoDir}\resources\win32\inno-big.bmp
|
||||
WizardSmallImageFile={#RepoDir}\resources\win32\inno-small.bmp
|
||||
SetupIconFile={#RepoDir}\resources\win32\code.ico
|
||||
|
||||
Reference in New Issue
Block a user