<commit_before>/**
 * @victorvhpg
 * https://github.com/victorvhpg/phonegap-build-react-boilerplate
 *
 */
"use strict";
var gulp = require("gulp");
var browserify = require("browserify");
var babelify = require("babelify");
var uglify = require("gulp-uglify");
var source = require("vinyl-source-stream");
var streamify = require("gulp-streamify");
var glob = require("glob");
var replace = require("gulp-replace");
var packageJSON = require("./package");
var browserSync = require("browser-sync").create();
var zip = require("gulp-zip");
var minifyCss = require("gulp-minify-css");
var concat = require("gulp-concat");
var sourcemaps = require("gulp-sourcemaps");
var eslint = require("gulp-eslint");
var del = require("del");
var imagemin = require("gulp-imagemin");
var pngquant = require("imagemin-pngquant");
var eslintConfig = JSON.parse(require("fs").readFileSync("./.eslintrc").toString());
var dependenciasNPM = Object.keys(packageJSON.dependencies);
var fs = require("fs");
var _parametros = require("minimist")(process.argv.slice(2), {
    boolean: true
});
var _idConfig = "phonegap-build-react-boilerplate";

//==============================================================================
var _PRODUCAO = (_parametros._.indexOf("build-android") >= 0 ||
    _parametros._.indexOf("build-wp") >= 0 ||
    _parametros._.indexOf("build-ios") >= 0);

if(!Object.hasOwnProperty.call(_parametros, "debug")) {
    _parametros.debug = !_PRODUCAO;
}
if(!Object.hasOwnProperty.call(_parametros, "min")) {
    _parametros.min = _PRODUCAO;
}
if(!Object.hasOwnProperty.call(_parametros, "ads")) {
    _parametros.ads = _PRODUCAO;
}
if(!Object.hasOwnProperty.call(_parametros, "onError")) {
    _parametros.onError = !_PRODUCAO;
}

/**
versionamento   A.B.C   MAJOR.MINOR.PATCH
build-android
--release=android???
--debug=true
--min=false
--onerror=true
--ads=false
--versao= // MAJOR.MINOR.PATCH

*/

//MAJOR.MINOR.PATCH
function incVersao(tipo, verAtual) {
    tipo = tipo.toUpperCase();
    var ver = {
        MAJOR: 0,
        MINOR: 1,
        PATCH: 2
    };
    if(!Object.hasOwnProperty.call(ver, tipo)) {
        throw new Error("tipo  versao invalido");
    }
    var tempVer = verAtual.split(".");
    return tempVer.map(function(v, indice) {
        return(ver[tipo] === indice) ? ((+v) + 1).toString() : v;
    }).join(".");
}<commit_msg>bug versionamento automatico<commit_after>/**
 * @victorvhpg
 * https://github.com/victorvhpg/phonegap-build-react-boilerplate
 *
 */
"use strict";
var gulp = require("gulp");
var browserify = require("browserify");
var babelify = require("babelify");
var uglify = require("gulp-uglify");
var source = require("vinyl-source-stream");
var streamify = require("gulp-streamify");
var glob = require("glob");
var replace = require("gulp-replace");
var packageJSON = require("./package");
var browserSync = require("browser-sync").create();
var zip = require("gulp-zip");
var minifyCss = require("gulp-minify-css");
var concat = require("gulp-concat");
var sourcemaps = require("gulp-sourcemaps");
var eslint = require("gulp-eslint");
var del = require("del");
var imagemin = require("gulp-imagemin");
var pngquant = require("imagemin-pngquant");
var eslintConfig = JSON.parse(require("fs").readFileSync("./.eslintrc").toString());
var dependenciasNPM = Object.keys(packageJSON.dependencies);
var fs = require("fs");
var _parametros = require("minimist")(process.argv.slice(2), {
    boolean: true
});
var _idConfig = "phonegap-build-react-boilerplate";

//==============================================================================
var _PRODUCAO = (_parametros._.indexOf("build-android") >= 0 ||
    _parametros._.indexOf("build-wp") >= 0 ||
    _parametros._.indexOf("build-ios") >= 0);

if(!Object.hasOwnProperty.call(_parametros, "debug")) {
    _parametros.debug = !_PRODUCAO;
}
if(!Object.hasOwnProperty.call(_parametros, "min")) {
    _parametros.min = _PRODUCAO;
}
if(!Object.hasOwnProperty.call(_parametros, "ads")) {
    _parametros.ads = _PRODUCAO;
}
if(!Object.hasOwnProperty.call(_parametros, "onError")) {
    _parametros.onError = !_PRODUCAO;
}

/**
versionamento   A.B.C   MAJOR.MINOR.PATCH
build-android
--release=android???
--debug=true
--min=false
--onerror=true
--ads=false
--versao= // MAJOR.MINOR.PATCH

*/

//MAJOR.MINOR.PATCH
function incVersao(tipo, verAtual) {
    tipo = tipo.toUpperCase();
    var ver = {
        MAJOR: 0,
        MINOR: 1,
        PATCH: 2
    };
    if(!Object.hasOwnProperty.call(ver, tipo)) {
        throw new Error("tipo  versao invalido");
    }
    var tempVer = verAtual.split(".");
    return tempVer.map(function(v, indice) {
        return(ver[tipo] === indice) ? ((+v) + 1).toString() : (indice > ver[tipo]) ? "0" : v;
    }).join(".");
}
{'fraction_non_alphanumeric': 0.21175726927939317, 'fraction_numerical': 0.0035819637589549094, 'mean_word_length': 4.5781433607520565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 2, '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': '3890340', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1629, 'n_words': 293}