<commit_before>var inquirer = require('inquirer');
var semver = require('semver');
var shell = require('shelljs');
var fs = require('fs');

var pkg = require('./package.json');
var bower = require('./bower.json');

console.log("");
console.log("Wellcome to Kefir release utility!");
console.log("----------------------------------------------------------------");
console.log("");

var questions = [
  {
    type: "list",
    name: "version",
    message: "Which version will it be? (current is " + pkg.version + ")",
    choices: [
      semver.inc(pkg.version, 'patch'),
      semver.inc(pkg.version, 'minor'),
      semver.inc(pkg.version, 'major'),
      semver.inc(pkg.version, 'premajor', 'rc')
    ]
  },
  {
    type: "list",
    name: "dryRun",
    message: "Do you want to release, or just see what would happen if you do?",
    choices: [
      'Just see',
      'Release!'
    ]
  }
];

inquirer.prompt(questions, function(answers) {
  var newVerison = answers.version;
  var dryRun = (answers.dryRun === 'Just see');

  bower.version = pkg.version = newVerison;

  console.log('');
  if (dryRun) {
    console.log('Ok, here is what would happen:');
  } else {
    console.log('Doing actual release:');
  }
  console.log('');

  run('npm test', dryRun) &&
  bumpVersion('package.json', pkg, dryRun) &&
  bumpVersion('bower.json', bower, dryRun) &&
  run('grunt', dryRun) &&
  run('grunt bower', dryRun) &&
  run('git add .', dryRun) &&
  run('git add -f dist', dryRun) &&
  run('git add -f index.html', dryRun) &&
  run('git add -f bower-packages', dryRun) &&
  run('git add -f test/in-browser/spec/KefirSpecs.js', dryRun) &&
  run('git commit -m "' + newVerison + '"', dryRun) &&
  run('git push', dryRun) &&
  run('git tag -a ' + newVerison + ' -m "v' + newVerison + '"', dryRun) &&
  run('git push origin --tags', dryRun) &&
  run('npm publish', dryRun) &&
  run('git rm -r dist', dryRun) &&
  run('git rm -r bower-packages', dryRun) &&<commit_msg>fix release script<commit_after>var inquirer = require('inquirer');
var semver = require('semver');
var shell = require('shelljs');
var fs = require('fs');

var pkg = require('./package.json');
var bower = require('./bower.json');

console.log("");
console.log("Wellcome to Kefir release utility!");
console.log("----------------------------------------------------------------");
console.log("");

var questions = [
  {
    type: "list",
    name: "version",
    message: "Which version will it be? (current is " + pkg.version + ")",
    choices: [
      semver.inc(pkg.version, 'patch'),
      semver.inc(pkg.version, 'minor'),
      semver.inc(pkg.version, 'major'),
      semver.inc(pkg.version, 'premajor', 'rc')
    ]
  },
  {
    type: "list",
    name: "dryRun",
    message: "Do you want to release, or just see what would happen if you do?",
    choices: [
      'Just see',
      'Release!'
    ]
  }
];

inquirer.prompt(questions, function(answers) {
  var newVerison = answers.version;
  var dryRun = (answers.dryRun === 'Just see');

  bower.version = pkg.version = newVerison;

  console.log('');
  if (dryRun) {
    console.log('Ok, here is what would happen:');
  } else {
    console.log('Doing actual release:');
  }
  console.log('');

  run('npm test', dryRun) &&
  bumpVersion('package.json', pkg, dryRun) &&
  bumpVersion('bower.json', bower, dryRun) &&
  run('`npm bin`/grunt', dryRun) &&
  run('`npm bin`/grunt bower', dryRun) &&
  run('git add .', dryRun) &&
  run('git add -f dist', dryRun) &&
  run('git add -f index.html', dryRun) &&
  run('git add -f bower-packages', dryRun) &&
  run('git add -f test/in-browser/spec/KefirSpecs.js', dryRun) &&
  run('git commit -m "' + newVerison + '"', dryRun) &&
  run('git push', dryRun) &&
  run('git tag -a ' + newVerison + ' -m "v' + newVerison + '"', dryRun) &&
  run('git push origin --tags', dryRun) &&
  run('npm publish', dryRun) &&
  run('git rm -r dist', dryRun) &&
  run('git rm -r bower-packages', dryRun) &&
{'fraction_non_alphanumeric': 0.2237408251075677, 'fraction_numerical': 0.0, 'mean_word_length': 2.971859296482412, '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': '6360199', 'n_tokens_mistral': 1385, 'n_tokens_neox': 1358, 'n_words': 348}