mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-31 09:35:39 -05:00
Integrate into asar (#6563)
* integrate into asar * add sql carbon tag * remove unnecessary edit * add more ignores
This commit is contained in:
@@ -10,6 +10,10 @@ const util = require('./lib/util');
|
||||
const tsfmt = require('typescript-formatter');
|
||||
const es = require('event-stream');
|
||||
const filter = require('gulp-filter');
|
||||
const del = require('del');
|
||||
const serviceDownloader = require('service-downloader').ServiceDownloadProvider;
|
||||
const platformInfo = require('service-downloader/out/platform').PlatformInformation;
|
||||
const path = require('path');
|
||||
|
||||
gulp.task('clean-mssql-extension', util.rimraf('extensions/mssql/node_modules'));
|
||||
gulp.task('clean-credentials-extension', util.rimraf('extensions/credentials/node_modules'));
|
||||
@@ -80,4 +84,49 @@ const formatStagedFiles = () => {
|
||||
process.exit(1);
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
function installService() {
|
||||
let config = require('../extensions/mssql/src/config.json');
|
||||
return platformInfo.getCurrent().then(p => {
|
||||
let runtime = p.runtimeId;
|
||||
// fix path since it won't be correct
|
||||
config.installDirectory = path.join(__dirname, '../extensions/mssql/src', config.installDirectory);
|
||||
var installer = new serviceDownloader(config);
|
||||
let serviceInstallFolder = installer.getInstallDirectory(runtime);
|
||||
console.log('Cleaning up the install folder: ' + serviceInstallFolder);
|
||||
return del(serviceInstallFolder + '/*').then(() => {
|
||||
console.log('Installing the service. Install folder: ' + serviceInstallFolder);
|
||||
return installer.installService(runtime);
|
||||
}, delError => {
|
||||
console.log('failed to delete the install folder error: ' + delError);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
gulp.task('install-sqltoolsservice', () => {
|
||||
return installService();
|
||||
});
|
||||
|
||||
function installSsmsMin() {
|
||||
const config = require('../extensions/admin-tool-ext-win/src/config.json');
|
||||
return platformInfo.getCurrent().then(p => {
|
||||
const runtime = p.runtimeId;
|
||||
// fix path since it won't be correct
|
||||
config.installDirectory = path.join(__dirname, '..', 'extensions', 'admin-tool-ext-win', config.installDirectory);
|
||||
var installer = new serviceDownloader(config);
|
||||
const serviceInstallFolder = installer.getInstallDirectory(runtime);
|
||||
const serviceCleanupFolder = path.join(serviceInstallFolder, '..');
|
||||
console.log('Cleaning up the install folder: ' + serviceCleanupFolder);
|
||||
return del(serviceCleanupFolder + '/*').then(() => {
|
||||
console.log('Installing the service. Install folder: ' + serviceInstallFolder);
|
||||
return installer.installService(runtime);
|
||||
}, delError => {
|
||||
console.log('failed to delete the install folder error: ' + delError);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
gulp.task('install-ssmsmin', () => {
|
||||
return installSsmsMin();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user