Remove mixin-server task

This commit is contained in:
Alex Dima 2021-10-27 16:47:39 +02:00
parent f2c91e74bf
commit eebf6387d5
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9

View file

@ -392,33 +392,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
});
});
});
function mixinServer(watch) {
const packageJSONPath = path.join(path.dirname(__dirname), 'package.json');
function exec(cmdLine) {
console.log(cmdLine);
cp.execSync(cmdLine, { stdio: 'inherit' });
}
function checkout() {
const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString());
exec('git fetch distro');
exec(`git checkout ${packageJSON['distro']} -- src/vs/server resources/server`);
exec('git reset HEAD src/vs/server resources/server');
}
checkout();
if (watch) {
console.log('Enter watch mode (observing package.json)');
const watcher = fs.watch(packageJSONPath);
watcher.addListener('change', () => {
try {
checkout();
} catch (e) {
console.log(e);
}
});
}
return Promise.resolve();
}
gulp.task(task.define('mixin-server', () => mixinServer(false)));
gulp.task(task.define('mixin-server-watch', () => mixinServer(true)));