mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
clean up scripts in extensionSamples (#946)
This commit is contained in:
@@ -186,14 +186,12 @@
|
||||
"gulp-sourcemaps": "^2.6.4",
|
||||
"gulp-tslint": "^6.0.2",
|
||||
"gulp-typescript": "^3.2.4",
|
||||
"pm-mocha-jenkins-reporter": "^0.2.6",
|
||||
"should": "^13.2.1",
|
||||
"temp-write": "^3.4.0",
|
||||
"tslint": "^3.14.0",
|
||||
"typemoq": "^2.1.0",
|
||||
"typescript": "^2.6.1",
|
||||
"vscode": "^1.1.6",
|
||||
"vsce": "1.36.2",
|
||||
"vso-node-api": "6.1.2-preview"
|
||||
"vsce": "1.36.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,6 @@ var path = require('path');
|
||||
|
||||
var projectRoot = path.resolve(path.dirname(__dirname));
|
||||
var srcRoot = path.resolve(projectRoot, 'src');
|
||||
var viewsRoot = path.resolve(srcRoot, 'views');
|
||||
var htmlcontentRoot = path.resolve(viewsRoot, 'htmlcontent');
|
||||
var outRoot = path.resolve(projectRoot, 'out');
|
||||
var htmloutroot = path.resolve(outRoot, 'src/views/htmlcontent');
|
||||
var localization = path.resolve(projectRoot, 'localization');
|
||||
|
||||
var config = {
|
||||
@@ -16,10 +12,6 @@ var config = {
|
||||
},
|
||||
extension: {
|
||||
root: srcRoot
|
||||
},
|
||||
html: {
|
||||
root: htmlcontentRoot,
|
||||
out: htmloutroot
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,115 +34,3 @@ let buildPackage = function(packageName) {
|
||||
console.log(command);
|
||||
return exec(command);
|
||||
};
|
||||
|
||||
|
||||
// function getServiceInstaller() {
|
||||
// let Constants = require('../out/src/models/constants').Constants;
|
||||
// let ServiceInstaller = require('../out/src/languageservice/serviceInstallerUtil').ServiceInstaller;
|
||||
// return new ServiceInstaller(new Constants())
|
||||
// }
|
||||
//
|
||||
// function installToolsService(platform) {
|
||||
// let installer = getServiceInstaller();
|
||||
// return installer.installService(platform);
|
||||
// }
|
||||
|
||||
// function cleanServiceInstallFolder() {
|
||||
// let installer = getServiceInstaller();
|
||||
// return new Promise(function(resolve, reject) {
|
||||
// installer.getServiceInstallDirectoryRoot().then(function (serviceInstallFolder) {
|
||||
// console.log('Deleting Service Install folder: ' + serviceInstallFolder);
|
||||
// del(serviceInstallFolder + '/*').then(function () {
|
||||
// resolve();
|
||||
// }).catch(function (error) {
|
||||
// reject(error)
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
// function doOfflinePackage(runtimeId, platform, packageName) {
|
||||
// return installSqlToolsService(platform).then(function() {
|
||||
// return doPackageSync(packageName + '-' + runtimeId + '.vsix');
|
||||
// });
|
||||
// }
|
||||
|
||||
// ORIGINAL GULP TASKS /////////////////////////////////////////////////////
|
||||
// TODO: Reinstate when we have code for loading a tools service
|
||||
|
||||
// gulp.task('ext:install-service', function() {
|
||||
// return installSqlToolsService();
|
||||
// });
|
||||
|
||||
// Install vsce to be able to run this task: npm install -g vsce
|
||||
// gulp.task('package:online', function() {
|
||||
// return cleanServiceInstallFolder()
|
||||
// .then(function() { return doPackageSync(); });
|
||||
// });
|
||||
|
||||
// Install vsce to be able to run this task: npm install -g vsce
|
||||
// gulp.task('package:offline', function() {
|
||||
// const platform = require('../out/src/models/platform');
|
||||
// const Runtime = platform.Runtime;
|
||||
// let json = JSON.parse(fs.readFileSync('package.json').toString());
|
||||
// let name = json.name;
|
||||
// let version = json.version;
|
||||
// let packageName = name + '-' + version;
|
||||
//
|
||||
// let packages = [];
|
||||
// packages.push({rid: 'win-x64', runtime: Runtime.Windows_64});
|
||||
// packages.push({rid: 'win-x86', runtime: Runtime.Windows_86});
|
||||
// packages.push({rid: 'osx', runtime: Runtime.OSX});
|
||||
// packages.push({rid: 'linux-x64', runtime: Runtime.Linux_64});
|
||||
//
|
||||
// let promise = Promise.resolve();
|
||||
// cleanServiceInstallFolder().then(function () {
|
||||
// packages.forEach(function (data) {
|
||||
// promise = promise.then(function () {
|
||||
// return doOfflinePackage(data.rid, data.runtime, packageName).then(function () {
|
||||
// return cleanServiceInstallFolder();
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
//
|
||||
// return promise;
|
||||
// });
|
||||
|
||||
function getOnlinePackageName() {
|
||||
return packageVals.name + "-" + packageVals.version + ".vsix";
|
||||
}
|
||||
|
||||
function getOnlinePackagePath() {
|
||||
return './' + getOnlinePackageName();
|
||||
}
|
||||
|
||||
// TEMPORARY GULP TASKS ////////////////////////////////////////////////////
|
||||
gulp.task('package:online', gulp.series("build", function() {
|
||||
return buildPackage(getOnlinePackageName());
|
||||
}));
|
||||
|
||||
gulp.task('package:offline', gulp.series("build", function(done) {
|
||||
// TODO: Get list of platforms
|
||||
// TODO: For each platform: clean the package service folder, download the service, build the package
|
||||
console.error("This mode is not yet supported");
|
||||
done("This mode is not yet supported");
|
||||
}));
|
||||
|
||||
gulp.task('install:sqlops', gulp.series("package:online", function() {
|
||||
let command = 'sqlops --install-extension ' + getOnlinePackagePath();
|
||||
console.log(command);
|
||||
return exec(command);
|
||||
}));
|
||||
|
||||
gulp.task("help:debug", function(done) {
|
||||
let command = '$SQLOPS_DEV/scripts/sql.sh --extensionDevelopmentPath='+process.cwd();
|
||||
console.log('Launch sqlops + your extension (from a sqlops dev enlistment after setting $SQLOPS_DEV to your enlistment root):\n')
|
||||
console.log(color(command, 'GREEN'));
|
||||
|
||||
command = 'sqlops --extensionDevelopmentPath='+process.cwd();
|
||||
console.log('\nLaunch sqlops + your extension (full SQLOPS - requires setting PATH variable)\n');
|
||||
console.log(color(command, 'GREEN'));
|
||||
done();
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user