<commit_before>#!/usr/bin/env bash

if [[ -z "$RAGUEL_DIR" ]]; then
  if [[ -z "$BASH_SOURCE" ]]; then
    RAGUEL_DIR=$(dirname $0)
  else
    RAGUEL_DIR=$(dirname "${BASH_SOURCE[0]}")
  fi
fi
. "${RAGUEL_DIR}/checker.sh"

_deployer_git_clone(){
    git clone $RAGUEL_DEPLOY_SOURCE_GIT $RAGUEL_DEPLOY_SOURCE_DIR
}

_deployer_git_latest(){
    rm -rf $RAGUEL_DEPLOY_BACKUP_DIR
    cp -ar $RAGUEL_DEPLOY_SOURCE_DIR $RAGUEL_DEPLOY_BACKUP_DIR
    cd $RAGUEL_DEPLOY_SOURCE_DIR
    git checkout .
    git pull
}

_deployer_git_rollback(){
    mv $RAGUEL_DEPLOY_SOURCE_DIR $RAGUEL_DEPLOY_BROKEN_DIR
    cp -ar $RAGUEL_DEPLOY_BACKUP_DIR $RAGUEL_DEPLOY_SOURCE_DIR
}

# deploy latest commit and backup current code
deployer_latest(){
    export RAGUEL_DEPLOY_SOURCE_GIT=$1
    export RAGUEL_DEPLOY_SOURCE_DIR=$2
    export RAGUEL_DEPLOY_BACKUP_DIR="\${SOURCE_DIR}.original"

    if_not_dir $RAGUEL_DEPLOY_SOURCE_DIR
        then_run "_deployer_git_clone"
    else_if_not_git_latest $RAGUEL_DEPLOY_SOURCE_DIR
        then_run "_deployer_git_latest"
}

# rollback to previous code
deployer_rollback(){
    export RAGUEL_DEPLOY_SOURCE_DIR=$1
    export RAGUEL_DEPLOY_BACKUP_DIR="\${SOURCE_DIR}.original"
    export RAGUEL_DEPLOY_BROKEN_DIR="\${SOURCE_DIR}.broken"

    if_dir $RAGUEL_DEPLOY_BACKUP_DIR
        then_run "_deployer_git_rollback"
}<commit_msg>corrected Var names in deployer<commit_after>#!/usr/bin/env bash

if [[ -z "$RAGUEL_DIR" ]]; then
  if [[ -z "$BASH_SOURCE" ]]; then
    RAGUEL_DIR=$(dirname $0)
  else
    RAGUEL_DIR=$(dirname "${BASH_SOURCE[0]}")
  fi
fi
. "${RAGUEL_DIR}/checker.sh"

_deployer_git_clone(){
    git clone $RAGUEL_DEPLOY_SOURCE_GIT $RAGUEL_DEPLOY_SOURCE_DIR
}

_deployer_git_latest(){
    rm -rf $RAGUEL_DEPLOY_BACKUP_DIR
    cp -ar $RAGUEL_DEPLOY_SOURCE_DIR $RAGUEL_DEPLOY_BACKUP_DIR
    cd $RAGUEL_DEPLOY_SOURCE_DIR
    git checkout .
    git pull
}

_deployer_git_rollback(){
    mv $RAGUEL_DEPLOY_SOURCE_DIR $RAGUEL_DEPLOY_BROKEN_DIR
    cp -ar $RAGUEL_DEPLOY_BACKUP_DIR $RAGUEL_DEPLOY_SOURCE_DIR
}

# deploy latest commit and backup current code
deployer_latest(){
    export RAGUEL_DEPLOY_SOURCE_GIT=$1
    export RAGUEL_DEPLOY_SOURCE_DIR=$2
    export RAGUEL_DEPLOY_BACKUP_DIR="\${RAGUEL_DEPLOY_SOURCE_DIR}.original"

    if_not_dir $RAGUEL_DEPLOY_SOURCE_DIR
        then_run "_deployer_git_clone"
    else_if_not_git_latest $RAGUEL_DEPLOY_SOURCE_DIR
        then_run "_deployer_git_latest"
}

# rollback to previous code
deployer_rollback(){
    export RAGUEL_DEPLOY_SOURCE_DIR=$1
    export RAGUEL_DEPLOY_BACKUP_DIR="\${RAGUEL_DEPLOY_SOURCE_DIR}.original"
    export RAGUEL_DEPLOY_BROKEN_DIR="\${RAGUEL_DEPLOY_SOURCE_DIR}.broken"

    if_dir $RAGUEL_DEPLOY_BACKUP_DIR
        then_run "_deployer_git_rollback"
}
{'fraction_non_alphanumeric': 0.09097525473071325, 'fraction_numerical': 0.00363901018922853, 'mean_word_length': 5.0153172866520785, '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': '2173337', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1177, 'n_words': 168}