<commit_before>#!/bin/bash

CONFIG_ROOT="/home/core/Shipmee_CID"

## Include dependencies

source $CONFIG_ROOT/commonDependencies/DockerUtils.sh


## Defining variables

source $CONFIG_ROOT/commonDependencies/variables.sh

BRANCH="develop"
URL_VIRTUAL_HOST="dev.shipmee.es"
URL_IMG_HOST="i.$URL_VIRTUAL_HOST"
CONF_TOMCAT_SERVER="$CONFIG_ROOT/$BRANCH-conf/tomcat7/server.xml"
IMG_PATH="$PATH_ROOT/deploys/$ENV_NAME/$BRANCH/images"

ENVS_FILE="$SHIPMEE_PRIV_CONFIG_PATH/.env-variables-file_dev"


## Compiling source
echo "_____________ Generando WAR _____________"

COMPILE_FOLDER="$PATH_ROOT/war_generation/$RANDOM_FOLDER_NAME"

mkdir -p "$COMPILE_FOLDER"

cp -r $REPO_PATH/$ENV_NAME-$BRANCH/* $COMPILE_FOLDER

cd $COMPILE_FOLDER

docker run --rm \
    -v $COMPILE_FOLDER:/root \
    -v "$PATH_ROOT/war_generation/.m2":/root/.m2 \
    -w /root \
    maven:3-jdk-8-alpine \
    mvn clean compile war:war


echo "_____________ Persistiendo war y otros archivos necesarios _____________"

find "$COMPILE_FOLDER/target/" -follow -name *.war -exec cp {} "$PATH_ROOT/Shipmee-$BRANCH.war" \;
# mv -f $COMPILE_FOLDER/target/Shipmee-*.war $PATH_ROOT/Shipmee-$BRANCH.war
mv -f $COMPILE_FOLDER/initialize.sql $PATH_ROOT/initialize-$BRANCH.sql


echo "_____________ Eliminando despliegue actual _____________"

dockerStopAndRm $ENV_NAME-$BRANCH-mysql<commit_msg>Eliminando archivo robots.txt de despliegue beta<commit_after>#!/bin/bash

CONFIG_ROOT="/home/core/Shipmee_CID"

## Include dependencies

source $CONFIG_ROOT/commonDependencies/DockerUtils.sh


## Defining variables

source $CONFIG_ROOT/commonDependencies/variables.sh

BRANCH="develop"
URL_VIRTUAL_HOST="dev.shipmee.es"
URL_IMG_HOST="i.$URL_VIRTUAL_HOST"
CONF_TOMCAT_SERVER="$CONFIG_ROOT/$BRANCH-conf/tomcat7/server.xml"
IMG_PATH="$PATH_ROOT/deploys/$ENV_NAME/$BRANCH/images"

ENVS_FILE="$SHIPMEE_PRIV_CONFIG_PATH/.env-variables-file_dev"


## Compiling source
echo "_____________ Generando WAR _____________"

COMPILE_FOLDER="$PATH_ROOT/war_generation/$RANDOM_FOLDER_NAME"

mkdir -p "$COMPILE_FOLDER"

cp -r $REPO_PATH/$ENV_NAME-$BRANCH/* $COMPILE_FOLDER

cd $COMPILE_FOLDER

    # Eliminar robots.txt para que no sea indexada por los buscadores
rm -f src/main/webapp/robots.txt

docker run --rm \
    -v $COMPILE_FOLDER:/root \
    -v "$PATH_ROOT/war_generation/.m2":/root/.m2 \
    -w /root \
    maven:3-jdk-8-alpine \
    mvn clean compile war:war


echo "_____________ Persistiendo war y otros archivos necesarios _____________"

find "$COMPILE_FOLDER/target/" -follow -name *.war -exec cp {} "$PATH_ROOT/Shipmee-$BRANCH.war" \;
# mv -f $COMPILE_FOLDER/target/Shipmee-*.war $PATH_ROOT/Shipmee-$BRANCH.war
mv -f $COMPILE_FOLDER/initialize.sql $PATH_ROOT/initialize-$BRANCH.sql


echo "_____________ Eliminando despliegue actual _____________"

dockerStopAndRm $ENV_NAME-$BRANCH-mysql
{'fraction_non_alphanumeric': 0.12328284607256076, 'fraction_numerical': 0.003522367030644593, 'mean_word_length': 5.228070175438597, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4205979', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1079, 'n_words': 165}