<commit_before>#!/bin/bash

echo "##### "
echo "##### ci/deploy.sh"
echo "#####"


function init {
  cd ..
  SITE_PATH=$(readJsonProp "config.json" "sitePath")
  cd ..
  export IONIC_DIR=$PWD
  SITE_DIR=$IONIC_DIR/$SITE_PATH
}

function run {

  cd $SITE_DIR
  git reset --hard
  git pull origin master

  VERSION=$(readJsonProp "package.json" "version")

  # process new docs
  gulp docs

  # CD in to the site dir to commit updated docs
  cd $SITE_DIR

  CHANGES=$(git status --porcelain)

  # if no changes, don't commit
  if [[ "$CHANGES" == "" ]]; then
    echo "-- No changes detected for the following commit, docs not updated."
    echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
  else
    git config --global user.email "<EMAIL>"
    git config --global user.name "Ionitron"
    git add -A
    git commit -am "Automated build of platform docs driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
    git push origin master

    echo "-- Updated docs for $VERSION_NAME succesfully!"
  fi
}

source $(dirname $0)/../utils.inc.sh
<commit_msg>explicity using gulp from node_modules<commit_after>#!/bin/bash

echo "##### "
echo "##### ci/deploy.sh"
echo "#####"


function init {
  cd ..
  SITE_PATH=$(readJsonProp "config.json" "sitePath")
  cd ..
  export IONIC_DIR=$PWD
  SITE_DIR=$IONIC_DIR/$SITE_PATH
}

function run {

  VERSION=$(readJsonProp "package.json" "version")

  # process new docs
  ./node_modules/.bin/gulp docs

  # CD in to the site dir to commit updated docs
  cd $SITE_DIR

  CHANGES=$(git status --porcelain)

  # if no changes, don't commit
  if [[ "$CHANGES" == "" ]]; then
    echo "-- No changes detected for the following commit, docs not updated."
    echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
  else
    git config --global user.email "<EMAIL>"
    git config --global user.name "Ionitron"
    git add -A
    git commit -am "Automated build of platform docs driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
    git push origin master

    echo "-- Updated docs for $VERSION_NAME succesfully!"
  fi
}

source $(dirname $0)/../utils.inc.sh

{'fraction_non_alphanumeric': 0.13476836686944316, 'fraction_numerical': 0.0028076743097800653, 'mean_word_length': 3.3811475409836067, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '93216', 'n_tokens_mistral': 783, 'n_tokens_neox': 739, 'n_words': 209}