<commit_before>var gulp = require('gulp'),
    cp = require('child_process'),
    args = require('yargs').argv,
    fs = require('fs');

gulp.task('deploy', () => {
  if(args.name){
    if(fs.existsSync(`deployed-releases/${args.name}`)){
      console.log(`Release "${args.name}" already deployed`);
      return;
    }
    if(!fs.existsSync(`releases/${args.name}.zip`)){
      console.log(`Release "${args.name}" does not exist`);
      return;
    }

    if(fs.existsSync(`releases/${args.name}.zip`)){
      // we unzip the release
      console.log(cp.execSync(`cd releases; unzip ${args.name}.zip -d ../deployed-releases`));
      console.log(`Release "${args.name}" deployed`)
    }
  } else {
    console.log('Parameter --name is required');
  }
});

gulp.task('remove', () => {
  if(args.name){
    if(!fs.existsSync(`deployed-releases/${args.name}`)){
      console.log(`Release "${args.name}" does not exist`);
      return;
    }

    if(fs.existsSync(`web`)){
      const currentRelease = getActiveRelease();

      if(currentRelease === args.name) {
        console.log(`Release "${args.name}" is the current active release, and cannot be removed`);
        return;
      }
    }<commit_msg>Added chmod for config file<commit_after>var gulp = require('gulp'),
    cp = require('child_process'),
    args = require('yargs').argv,
    fs = require('fs');

gulp.task('deploy', () => {
  if(args.name){
    if(fs.existsSync(`deployed-releases/${args.name}`)){
      console.log(`Release "${args.name}" already deployed`);
      return;
    }
    if(!fs.existsSync(`releases/${args.name}.zip`)){
      console.log(`Release "${args.name}" does not exist`);
      return;
    }

    if(fs.existsSync(`releases/${args.name}.zip`)){
      // we unzip the release
      console.log(cp.execSync(`cd releases; unzip ${args.name}.zip -d ../deployed-releases`));
      console.log(cp.execSync(`chmod 0775 deployed-releases/${args.name}/config/sync`));
      console.log(`Release "${args.name}" deployed`)
    }
  } else {
    console.log('Parameter --name is required');
  }
});

gulp.task('remove', () => {
  if(args.name){
    if(!fs.existsSync(`deployed-releases/${args.name}`)){
      console.log(`Release "${args.name}" does not exist`);
      return;
    }

    if(fs.existsSync(`web`)){
      const currentRelease = getActiveRelease();

      if(currentRelease === args.name) {
        console.log(`Release "${args.name}" is the current active release, and cannot be removed`);
        return;
      }
    }
{'fraction_non_alphanumeric': 0.19681908548707752, 'fraction_numerical': 0.0015904572564612327, 'mean_word_length': 3.0910569105691055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1006128', 'n_tokens_mistral': 815, 'n_tokens_neox': 799, 'n_words': 149}