<commit_before>#!/bin/bash -e

pwd = ${PWD##/}
root = "/home/ubuntu/sqat"

if [ "$pwd" != "home/ubuntu/sqat"; ] then
  echo "Changing your working directory to home/ubuntu/sqat"
  cd "$root"
fi

# Stop all forever process
forever stopall

git pull

# run style checker micro service
cd "${root}/stylechecker"
./gradlew installDist
cd build/install/sqat-stylechecker/bin
forever start -c bash sqat-stylechecker

cd "$root/website"
nvm use
npm install
npm run deploy
NODE_ENV=production PORT=4000 forever start ./backend/babel_index.js<commit_msg>better deploy script<commit_after>#!/bin/bash -e

pwd=${PWD##/}
root="/home/ubuntu/sqat"

if [ "$pwd" != "home/ubuntu/sqat" ] 
then
  echo "Changing your working directory to home/ubuntu/sqat"
  cd "$root"
fi

# Stop all forever process
forever stopall

git pull

# run style checker micro service
cd "${root}/stylechecker"
./gradlew installDist
cd build/install/sqat-stylechecker/bin
forever start -c bash sqat-stylechecker

cd "$root/website"
npm install
npm run deploy
NODE_ENV=production PORT=4000 forever start ./backend/babel_index.js

forever list

{'fraction_non_alphanumeric': 0.1190909090909091, 'fraction_numerical': 0.007272727272727273, 'mean_word_length': 4.505, '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': '2512706', 'n_tokens_mistral': 412, 'n_tokens_neox': 376, 'n_words': 115}