<commit_before>#!/bin/bash
set -ev

#-------------------------------------------------------------------------------
# Choose the repos
#-------------------------------------------------------------------------------
JHIPSTER_REPO=https://github.com/jhipster/generator-jhipster.git
JHIPSTER_BRANCH=master

# if the JHIPSTER_DEPENDENCIES_BRANCH value is release,
# it won't clone the project but use the release from Maven
JHIPSTER_DEPENDENCIES_REPO=https://github.com/jhipster/jhipster-dependencies.git
JHIPSTER_DEPENDENCIES_BRANCH=release

#-------------------------------------------------------------------------------
# Install jhipster-dependencies
#-------------------------------------------------------------------------------
cd $TRAVIS_BUILD_DIR
if [[ "$JHIPSTER_DEPENDENCIES_BRANCH" != "release" ]]; then
    git clone "$JHIPSTER_DEPENDENCIES_REPO" jhipster-dependencies
    cd jhipster-dependencies
    if [ "$JHIPSTER_DEPENDENCIES_BRANCH" == "latest" ]; then
        LATEST=$(git describe --abbrev=0)
        git checkout -b $LATEST $LATEST
    elif [ "$JHIPSTER_DEPENDENCIES_BRANCH" != "master" ]; then
        git checkout -b $JHIPSTER_BRANCH origin/$JHIPSTER_BRANCH
    fi
    git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

    ./mvnw clean install -Dgpg.skip=true
fi
ls -al ~/.m2/repository/io/github/jhipster/jhipster-dependencies/

#-------------------------------------------------------------------------------
# Install JHipster
#-------------------------------------------------------------------------------
cd $TRAVIS_BUILD_DIR
git clone $JHIPSTER_REPO generator-jhipster
cd generator-jhipster
if [ "$JHIPSTER_BRANCH" == "latest" ]; then
    LATEST=$(git describe --abbrev=0)
    git checkout -b $LATEST $LATEST
elif [ "$JHIPSTER_BRANCH" != "master" ]; then
    git checkout -b $JHIPSTER_BRANCH origin/$JHIPSTER_BRANCH
fi
git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

yarn install
yarn global add file:"$TRAVIS_BUILD_DIR"/generator-jhipster<commit_msg>Fix listing of jhipster-dependencies m2 folder<commit_after>#!/bin/bash
set -ev

#-------------------------------------------------------------------------------
# Choose the repos
#-------------------------------------------------------------------------------
JHIPSTER_REPO=https://github.com/jhipster/generator-jhipster.git
JHIPSTER_BRANCH=master

# if the JHIPSTER_DEPENDENCIES_BRANCH value is release,
# it won't clone the project but use the release from Maven
JHIPSTER_DEPENDENCIES_REPO=https://github.com/jhipster/jhipster-dependencies.git
JHIPSTER_DEPENDENCIES_BRANCH=release

#-------------------------------------------------------------------------------
# Install jhipster-dependencies
#-------------------------------------------------------------------------------
cd $TRAVIS_BUILD_DIR
if [[ "$JHIPSTER_DEPENDENCIES_BRANCH" != "release" ]]; then
    git clone "$JHIPSTER_DEPENDENCIES_REPO" jhipster-dependencies
    cd jhipster-dependencies
    if [ "$JHIPSTER_DEPENDENCIES_BRANCH" == "latest" ]; then
        LATEST=$(git describe --abbrev=0)
        git checkout -b $LATEST $LATEST
    elif [ "$JHIPSTER_DEPENDENCIES_BRANCH" != "master" ]; then
        git checkout -b $JHIPSTER_BRANCH origin/$JHIPSTER_BRANCH
    fi
    git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

    ./mvnw clean install -Dgpg.skip=true
    ls -al ~/.m2/repository/io/github/jhipster/jhipster-dependencies/
fi

#-------------------------------------------------------------------------------
# Install JHipster
#-------------------------------------------------------------------------------
cd $TRAVIS_BUILD_DIR
git clone $JHIPSTER_REPO generator-jhipster
cd generator-jhipster
if [ "$JHIPSTER_BRANCH" == "latest" ]; then
    LATEST=$(git describe --abbrev=0)
    git checkout -b $LATEST $LATEST
elif [ "$JHIPSTER_BRANCH" != "master" ]; then
    git checkout -b $JHIPSTER_BRANCH origin/$JHIPSTER_BRANCH
fi
git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

yarn install
yarn global add file:"$TRAVIS_BUILD_DIR"/generator-jhipster
{'fraction_non_alphanumeric': 0.32033937170373766, 'fraction_numerical': 0.00343957807842238, 'mean_word_length': 1.7907869481765835, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '785356', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1359, 'n_words': 274}