<commit_before>#!/bin/bash

function getVersion {
    mvn ${MVN_ARGS} org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v "\[INFO\]"
}

if test -z "$TRAVIS_BRANCH"; then
    BRANCH=$(git rev-parse --abbrev-ref HEAD)
else
    BRANCH=${TRAVIS_BRANCH}
fi

if [ ${BRANCH} = "release" ]; then
    #Extract the version
    VERSION=getVersion
    TAG="choco-${VERSION}"
    COMMIT=$(git rev-parse HEAD)

    #Quit if tag already exists
    git ls-remote --exit-code --tags origin ${TAG} ||exit 1

    #Working version ?
    # Well, we assume the tests have been run before, and everything is OK for the release
    #mvn clean test ||exit 1

    #Integrate with master and tag
    echo "** Integrate to master **"
    git checkout master
    git merge --no-ff ${COMMIT}

#    NOT USED FOR THE MOMENT
#    #Javadoc
#    ./bin/push_javadoc apidocs.git ${VERSION}

    git tag ${TAG} ||exit 1
    git push --tags ||exit 1
    git push origin master ||exit 1

    #Set the next development version
    echo "** Prepare develop for the next version **"
    git checkout develop
    git merge --no-ff ${TAG}
    ./bin/set_version.sh --next ${VERSION}
    git commit -m "Prepare the code for the next version" -a

    #Push changes on develop, with the tag
    git push origin develop ||exit 1

    git push --all && git push --tags

#    NOT USED FOR THE MOMENT
#    #Deploy the artifacts
#    echo "** Deploying the artifacts **"
#    ./bin/deploy.sh ||exit 1

    #Clean
    git push origin --delete release
else
    mvn clean install -DtestFailureIgnore=true -Dgroups="1s" || exit 1
    mvn clean install -DtestFailureIgnore=true -Dgroups="10s" || exit 1
    mvn clean install -DtestFailureIgnore=true -Dgroups="1m" || exit 1
    mvn clean install -DtestFailureIgnore=true -Dgroups="10m" || exit 1
    mvn clean install -DtestFailureIgnore=true -Dgroups="30ms" || exit 1
fi<commit_msg>[release] build.sh<commit_after>#!/bin/bash

function getVersion {
    mvn ${MVN_ARGS} org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v "\[INFO\]"
}

if test -z "$TRAVIS_BRANCH"; then
    BRANCH=$(git rev-parse --abbrev-ref HEAD)
else
    BRANCH=${TRAVIS_BRANCH}
fi

if [ ${BRANCH} = "release" ]; then
    #Extract the version
    VERSION=getVersion
    TAG="choco-${VERSION}"
    COMMIT=$(git rev-parse HEAD)

    #Quit if tag already exists
    git ls-remote --exit-code --tags origin ${TAG} ||exit 1

    #Working version ?
    # Well, we assume the tests have been run before, and everything is OK for the release
    #mvn clean test ||exit 1

    #Integrate with master and tag
    echo "** Integrate to master **"
    git checkout master
    git merge --no-ff ${COMMIT}

#    NOT USED FOR THE MOMENT
#    #Javadoc
#    ./bin/push_javadoc apidocs.git ${VERSION}

    git tag ${TAG} ||exit 1
    git push --tags ||exit 1
    git push origin master ||exit 1

    #Set the next development version
    echo "** Prepare develop for the next version **"
    git checkout develop
    git merge --no-ff ${TAG}
    ./bin/set_version.sh --next ${VERSION}
    git commit -m "Prepare the code for the next version" -a

    #Push changes on develop, with the tag
    git push origin develop ||exit 1

    git push --all && git push --tags

#    NOT USED FOR THE MOMENT
#    #Deploy the artifacts
#    echo "** Deploying the artifacts **"
#    ./bin/deploy.sh ||exit 1

    #Clean
    git push origin --delete release
else
    mvn clean install -DtestFailureIgnore=true -Dgroups="1s,10s,1m,10m"
    mvn test -DtestFailureIgnore=true -Dgroups="30m"
fi
{'fraction_non_alphanumeric': 0.11803823773898586, 'fraction_numerical': 0.011360487669714602, 'mean_word_length': 2.881720430107527, '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': '3584521', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1163, 'n_words': 416}