<commit_before>#!/usr/bin/env bash
if [[ -n "$DEBUG" ]]; then 
  set -x
fi

set -o pipefail  # trace ERR through pipes
set -o errtrace  # trace ERR through 'time command' and other functions
set -o nounset   ## set -u : exit the script if you try to use an uninitialised variable
set -o errexit   ## set -e : exit the script if any statement returns a non-true return value

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # http://stackoverflow.com/questions/59895
cd $DIR

usage(){
    ./beanstalk-describe.sh ucldc-solr
    echo "deploy-version.sh version-label environment-name"
    exit 1
}

if [ $# -ne 2 ];
  then
    usage
fi

set -u

ZIP=ucldc-solr-ebs.zip
DIR=ucldc-solr-beanstalk
BUCKET=solr.ucldc
REGION=us-west-2
APPNAME=ucldc-solr

# make sure environment actually exists
env_exists=$(aws elasticbeanstalk describe-environments \
  --environment-name "$2" \
  --region $REGION \
  | jq '.Environments | length')

if [[ env_exists -ne 1 ]]<commit_msg>Name zip file with version name<commit_after>#!/usr/bin/env bash
if [[ -n "$DEBUG" ]]; then 
  set -x
fi

set -o pipefail  # trace ERR through pipes
set -o errtrace  # trace ERR through 'time command' and other functions
set -o nounset   ## set -u : exit the script if you try to use an uninitialised variable
set -o errexit   ## set -e : exit the script if any statement returns a non-true return value

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # http://stackoverflow.com/questions/59895
cd $DIR

usage(){
    ./beanstalk-describe.sh ucldc-solr
    echo "deploy-version.sh version-label environment-name"
    exit 1
}

if [ $# -ne 2 ];
  then
    usage
fi

set -u

ZIP="ucldc-solr-ebs-$1.zip"
DIR=ucldc-solr-beanstalk
BUCKET=solr.ucldc
REGION=us-west-2
APPNAME=ucldc-solr

# make sure environment actually exists
env_exists=$(aws elasticbeanstalk describe-environments \
  --environment-name "$2" \
  --region $REGION \
  | jq '.Environments | length')

if [[ env_exists -ne 1 ]]
{'fraction_non_alphanumeric': 0.13116420945602442, 'fraction_numerical': 0.011692933401118455, 'mean_word_length': 3.3830734966592426, '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': '7202222', 'n_tokens_mistral': 726, 'n_tokens_neox': 685, 'n_words': 221}