<commit_before>var git = require('git-rev');

module.exports = function (grunt) {
  grunt.registerMultiTask('dist', 'Builds the various flavours of hull.js', function () {
    grunt.task.run(this.data);
  });

  grunt.registerTask("version", "generate a file from a template", function () {
    var conf = grunt.config("version");
    var done = this.async();
    function write (name) {
      grunt.config.set("PKG_VERSION", name);
      grunt.file.write(conf.dest, grunt.template.process(conf.template));
      grunt.log.writeln('Generated version description for \'' + conf.dest + '\' successfully.');
      done();
    }
    git.branch(function(branch){
      if (branch === 'HEAD') {
        git.tag(write);
      } else {
        write(branch);
      }
    });

  });
};
<commit_msg>Deploys tag when master is deployed<commit_after>var git = require('git-rev');

module.exports = function (grunt) {
  grunt.registerMultiTask('dist', 'Builds the various flavours of hull.js', function () {
    grunt.task.run(this.data);
  });

  grunt.registerTask("version", "generate a file from a template", function () {
    var conf = grunt.config("version");
    var done = this.async();
    function write (name) {
      grunt.config.set("PKG_VERSION", name);
      grunt.file.write(conf.dest, grunt.template.process(conf.template));
      grunt.log.writeln('Generated version description for \'' + conf.dest + '\' successfully.');
      done();
    }
    git.branch(function(branch) {
      if (['HEAD', 'master'].indexOf(branch) !== -1) {
        git.tag(write);
      } else {
        write(branch);
      }
    });

  });
};

{'fraction_non_alphanumeric': 0.17046153846153847, 'fraction_numerical': 0.0006153846153846154, 'mean_word_length': 3.0247524752475248, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7619585', 'n_tokens_mistral': 512, 'n_tokens_neox': 507, 'n_words': 106}