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

if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_JOB_NUMBER" = "$TRAVIS_BUILD_NUMBER.1" ]
then
  # Determine folder and version based on tag or branch
  if [ ! -z "$TRAVIS_TAG" ]
  then
    echo "PROD: Deploying $TRAVIS_TAG to server"
    folder="meditation-plus"
    version=$TRAVIS_TAG
  elif [ "$TRAVIS_BRANCH" = "master" ]
  then
    echo "TEST: Deploying master to test server"
    folder="meditation-plus-test"
    version="$TRAVIS_BUILD_NUMBER.0.0"
  else
    exit
  fi

  chmod 600 deploy_key
  mv deploy_key ~/.ssh/id_rsa
  touch dist/assets/version.json
  echo "{ \"version\": \"$TRAVIS_TAG\" }" > dist/assets/version.json
  tar -czf transfer-client.tgz dist
  scp -o "StrictHostKeyChecking no" transfer-client.tgz jenkins@172.16.58.3:/var/www/$folder
  ssh -o "StrictHostKeyChecking no" jenkins@172.16.58.3 "cd /var/www/$folder; rm -rf client; mkdir client; tar -xzf transfer-client.tgz -C client --strip 1; rm transfer-client.tgz"
fi<commit_msg>chore(deploy): changes dev server<commit_after>#!/bin/bash
set -x

if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_JOB_NUMBER" = "$TRAVIS_BUILD_NUMBER.1" ]
then
  # Determine folder and version based on tag or branch
  if [ ! -z "$TRAVIS_TAG" ]
  then
    echo "PROD: Deploying $TRAVIS_TAG to server"
    server="meditation.sirimangalo.org"
    version=$TRAVIS_TAG
  elif [ "$TRAVIS_BRANCH" = "master" ]
  then
    echo "TEST: Deploying master to test server"
    server="meditation-dev.sirimangalo.org"
    version="$TRAVIS_BUILD_NUMBER.0.0"
  else
    exit
  fi

  chmod 600 deploy_key
  mv deploy_key ~/.ssh/id_rsa
  touch dist/assets/version.json
  echo "{ \"version\": \"$TRAVIS_TAG\" }" > dist/assets/version.json
  tar -czf transfer-client.tgz dist
  scp -o "StrictHostKeyChecking no" transfer-client.tgz jenkins@$server:/var/www/meditation-plus
  ssh -o "StrictHostKeyChecking no" jenkins@$server "cd /var/www/meditation-plus; rm -rf client; mkdir client; tar -xzf transfer-client.tgz -C client --strip 1; rm transfer-client.tgz"
fi
{'fraction_non_alphanumeric': 0.13362701908957417, 'fraction_numerical': 0.014684287812041116, 'mean_word_length': 3.7314814814814814, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 2, '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': '1133535', 'n_tokens_mistral': 809, 'n_tokens_neox': 765, 'n_words': 182}