<commit_before>/**
 * Library release script.
 *
 * @module scripts/release.
 */

const shelljs = require('shelljs');
const options = require('minimist')(process.argv.slice(1));
const logger = require('log-symbols');
const format = require('util').format;


if (!options.version) {
    console.log(logger.error, 'No --version=<major.minor.patch> option defined!');
    process.exit(1);
}

// Available remotes
const remotes = (options.remotes) ? options.remotes.split(',') : ['origin'];

var cmds = [
    // Update package.json version
    format('npm version --no-git-tag-version %s', options.version),

    // Commit the new release
    'git add package.json',
    format('git commit -m "Release %s"', options.version),
    format('git tag -a v%s -m "Release %s"', options.version, options.version)
];

for (let remote of remotes) {
    cmds.push(format('git push %s v%s', remote, options.version));
    cmds.push(format('git push %s master', remote));
}

shelljs.exec(cmds.join(' && '), function(code) {
    process.exit(code);
});
<commit_msg>Update release script.<commit_after>/**
 * Library release script.
 *
 * @module scripts/release.
 */

const shelljs = require('shelljs');
const options = require('minimist')(process.argv.slice(1));
const logger = require('log-symbols');
const format = require('util').format;


if (!options.version) {
    console.log(logger.error, 'No --version=<major.minor.patch> option defined!');
    process.exit(1);
}

// Available remotes
const remotes = (options.remotes) ? options.remotes.split(',') : ['origin'];

var cmds = [
    // Update package.json version
    format('npm --no-git-tag-version version %s', options.version),

    // Commit the new release
    'git add package.json',
    format('git commit -m "Release %s"', options.version),
    format('git tag -a v%s -m "Release %s"', options.version, options.version)
];

for (let remote of remotes) {
    cmds.push(format('git push %s v%s', remote, options.version));
    cmds.push(format('git push %s master', remote));
}

shelljs.exec(cmds.join(' && '), function(code) {
    process.exit(code);
});

{'fraction_non_alphanumeric': 0.1821207798383262, 'fraction_numerical': 0.0019020446980504042, 'mean_word_length': 3.9389671361502345, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3662650', 'n_tokens_mistral': 685, 'n_tokens_neox': 676, 'n_words': 170}