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

moveEntity() {
  local entity="$1"
  mv $JHIPSTER_SAMPLES/.jhipster/"$entity".json $HOME/$JHIPSTER/.jhipster/
}

generateEntity() {
  local entity="$1"
  if [ -a .jhipster/"$entity".json ]; then
    yo jhipster:entity "$entity" --force --no-insight
    if [ "$JHIPSTER" == "app-cassandra" ]; then
      cat src/main/resources/config/cql/*_added_entity_"$entity".cql >> src/main/resources/config/cql/create-tables.cql
    fi
  fi
}

#-------------------------------------------------------------------------------
# Copy entities json
#-------------------------------------------------------------------------------
mkdir -p $HOME/$JHIPSTER/.jhipster/
if [ "$JHIPSTER" == "app-mongodb" ]; then
  moveEntity BankAccountMongo

  moveEntity FieldTestEntity
  moveEntity FieldTestMapstructEntity
  moveEntity FieldTestServiceClassEntity
  moveEntity FieldTestServiceImplEntity
  moveEntity FieldTestInfiniteScrollEntity
  moveEntity FieldTestPagerEntity
  moveEntity FieldTestPaginationEntity

elif [ "$JHIPSTER" == "app-cassandra" ]; then
  moveEntity BankAccountCassandra

  moveEntity FieldTestEntity
  moveEntity FieldTestMapstructEntity
  moveEntity FieldTestServiceClassEntity
  moveEntity FieldTestServiceImplEntity

elif [ "$JHIPSTER" == "app-mysql" || "$JHIPSTER" == "app-psql-es-noi18n" ]; then
  moveEntity BankAccount
  moveEntity Label
  moveEntity Operation

  moveEntity FieldTestEntity
  moveEntity FieldTestMapstructEntity
  moveEntity FieldTestServiceClassEntity
  moveEntity FieldTestServiceImplEntity
  moveEntity FieldTestInfiniteScrollEntity
  moveEntity FieldTestPagerEntity
  moveEntity FieldTestPaginationEntity

  moveEntity TestEntity
  moveEntity TestMapstructEntity
  moveEntity TestServiceClassEntity
  moveEntity TestServiceImplEntity
  moveEntity TestInfiniteScrollEntity
  moveEntity TestPagerEntity
  moveEntity TestPaginationEntity
  moveEntity TestManyToOneEntity
  moveEntity TestManyToManyEntity
  moveEntity TestOneToOneEntity

else
  moveEntity BankAccount
  moveEntity Label
  moveEntity Operation

  moveEntity FieldTestEntity
  moveEntity FieldTestMapstructEntity
  moveEntity FieldTestServiceClassEntity
  moveEntity FieldTestServiceImplEntity
  moveEntity FieldTestInfiniteScrollEntity
  moveEntity FieldTestPagerEntity
  moveEntity FieldTestPaginationEntity
fi

#-------------------------------------------------------------------------------
# Generate the entities with yo jhipster:entity
#-------------------------------------------------------------------------------
cd $HOME/$JHIPSTER
generateEntity BankAccount
generateEntity Label
generateEntity Operation

generateEntity FieldTestEntity
generateEntity FieldTestMapstructEntity
generateEntity FieldTestServiceClassEntity
generateEntity FieldTestServiceImplEntity
generateEntity FieldTestInfiniteScrollEntity
generateEntity FieldTestPagerEntity
generateEntity FieldTestPaginationEntity

generateEntity TestEntity
generateEntity TestMapstructEntity
generateEntity TestServiceClassEntity
generateEntity TestServiceImplEntity
generateEntity TestInfiniteScrollEntity
generateEntity TestPagerEntity
generateEntity TestPaginationEntity<commit_msg>Travis: fix cassandra travis build<commit_after>#!/bin/bash
set -ev

moveEntity() {
  local entity="$1"
  mv $JHIPSTER_SAMPLES/.jhipster/"$entity".json $HOME/$JHIPSTER/.jhipster/
}

generateEntity() {
  local entity="$1"
  if [ -a .jhipster/"$entity".json ]; then
    yo jhipster:entity "$entity" --force --no-insight
    if [ "$JHIPSTER" == "app-cassandra" ]; then
      cat src/main/resources/config/cql/*_added_entity_"$entity".cql >> src/main/resources/config/cql/create-tables.cql
    fi
  fi
}

#-------------------------------------------------------------------------------
# Copy entities json
#-------------------------------------------------------------------------------
mkdir -p $HOME/$JHIPSTER/.jhipster/
if [ "$JHIPSTER" == "app-mongodb" ]; then
  moveEntity MongoBankAccount

  moveEntity FieldTestEntity
  moveEntity FieldTestMapstructEntity
  moveEntity FieldTestServiceClassEntity
  moveEntity FieldTestServiceImplEntity
  moveEntity FieldTestInfiniteScrollEntity
  moveEntity FieldTestPagerEntity
  moveEntity FieldTestPaginationEntity

elif [ "$JHIPSTER" == "app-cassandra" ]; then
  moveEntity CassBankAccount

  moveEntity CassTestEntity
  moveEntity CassTestMapstructEntity
  moveEntity CassTestServiceClassEntity
  moveEntity CassTestServiceImplEntity

elif [ "$JHIPSTER" == "app-mysql" || "$JHIPSTER" == "app-psql-es-noi18n" ]; then
  moveEntity BankAccount
  moveEntity Label
  moveEntity Operation

  moveEntity FieldTestEntity
  moveEntity FieldTestMapstructEntity
  moveEntity FieldTestServiceClassEntity
  moveEntity FieldTestServiceImplEntity
  moveEntity FieldTestInfiniteScrollEntity
  moveEntity FieldTestPagerEntity
  moveEntity FieldTestPaginationEntity

  moveEntity TestEntity
  moveEntity TestMapstructEntity
  moveEntity TestServiceClassEntity
  moveEntity TestServiceImplEntity
  moveEntity TestInfiniteScrollEntity
  moveEntity TestPagerEntity
  moveEntity TestPaginationEntity
  moveEntity TestManyToOneEntity
  moveEntity TestManyToManyEntity
  moveEntity TestOneToOneEntity

else
  moveEntity BankAccount
  moveEntity Label
  moveEntity Operation

  moveEntity FieldTestEntity
  moveEntity FieldTestMapstructEntity
  moveEntity FieldTestServiceClassEntity
  moveEntity FieldTestServiceImplEntity
  moveEntity FieldTestInfiniteScrollEntity
  moveEntity FieldTestPagerEntity
  moveEntity FieldTestPaginationEntity
fi

ls -l $HOME/$JHIPSTER/.jhipster/

#-------------------------------------------------------------------------------
# Generate the entities with yo jhipster:entity
#-------------------------------------------------------------------------------
cd $HOME/$JHIPSTER
generateEntity BankAccount
generateEntity MongoBankAccount
generateEntity CassBankAccount
generateEntity Label
generateEntity Operation

generateEntity CassTestEntity
generateEntity CassTestMapstructEntity
generateEntity CassTestServiceClassEntity
generateEntity CassTestServiceImplEntity

generateEntity FieldTestEntity
generateEntity FieldTestMapstructEntity
generateEntity FieldTestServiceClassEntity
generateEntity FieldTestServiceImplEntity
generateEntity FieldTestInfiniteScrollEntity
generateEntity FieldTestPagerEntity
generateEntity FieldTestPaginationEntity

generateEntity TestEntity
generateEntity TestMapstructEntity
generateEntity TestServiceClassEntity
generateEntity TestServiceImplEntity
generateEntity TestInfiniteScrollEntity
generateEntity TestPagerEntity
generateEntity TestPaginationEntity
{'fraction_non_alphanumeric': 0.14186327888687236, 'fraction_numerical': 0.0012099213551119178, 'mean_word_length': 3.660324171952079, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4426043', 'n_tokens_mistral': 1675, 'n_tokens_neox': 1661, 'n_words': 378}