<commit_before>#!/bin/bash
# @company Daily Raisin LLC
# @author <NAME>
# @role rsync the distribution code to the server
# @usage: ./deploy.sh {dev|www}

#get target directory and port numbers from config file - created by grunt build and package.json values
source ./.config.sh

case "$1" in
www)
    PORT=$WWW_PORT;
;;
dev)
    PORT=$DEV_PORT;
;;
*)
    echo "Usage: $0 {dev|www}";
    exit 1
esac
DST_PATH="/www/$DIR/$1"

#stop the node service
ssh $HOST "mkdir -pv $DST_PATH; /usr/local/bin/node-ctrl.sh $DST_PATH/app.js $PORT stop; exit" ;

#rsync
rsync -avz --delete-excluded --exclude-from=.excludes dist/$1/ package.json -e ssh $HOST:$DST_PATH ;

#start the node service
ssh $HOST "cd $DST_PATH && npm install --production; /usr/local/bin/node-ctrl.sh $DST_PATH/app.js $PORT start; exit" ;<commit_msg>Update deploy task to work with new project configuration.<commit_after>#!/bin/bash
# @company Daily Raisin LLC
# @author <NAME>
# @role rsync the distribution code to the server
# @usage: ./deploy.sh {dev|www}

#get target directory and port numbers from config file - created by grunt build and package.json values
source ./.config.sh

case "$1" in
www)
    PORT=$WWW_PORT;
;;
dev)
    PORT=$DEV_PORT;
;;
*)
    echo "Usage: $0 {dev|www}";
    exit 1
esac
DST_PATH="/www/$DIR/$1"

#stop the node service
ssh $HOST "mkdir -pv $DST_PATH; /usr/local/bin/node-ctrl.sh $DST_PATH/app.js $PORT stop; exit" ;

#rsync
rsync -avz --delete-excluded --exclude-from=.excludes dist/$1/ -e ssh $HOST:$DST_PATH ;

#start the node service
ssh $HOST "cd $DST_PATH && npm install --production; /usr/local/bin/node-ctrl.sh $DST_PATH/server/server.js $PORT start; exit" ;
{'fraction_non_alphanumeric': 0.14981949458483754, 'fraction_numerical': 0.006016847172081829, 'mean_word_length': 3.8202898550724638, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, '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': '6054717', 'n_tokens_mistral': 626, 'n_tokens_neox': 599, 'n_words': 189}