<commit_before>#!/bin/sh -i
#====================================================================================================
#
# Deploys a dev build to spot.colorado.edu
# You must run this from the root level of your simulation repo.
# Usage: ../chipper/bin/deploy-dev.sh username
#
# Author: <NAME> (PixelZoom, Inc.)
#
#====================================================================================================

PACKAGE_JSON=./package.json
BUILD_DIR=build

# parse command line
if [ $# != 1 ]; then
   echo "Usage: deploy-dev username" ; exit 1
fi
USER_NAME=${1}

# check prerequisite files
if [ ! -f $PACKAGE_JSON ]; then
   echo "Cannot find $PACKAGE_JSON" ; exit 1
fi
if [ ! -d $BUILD_DIR ]; then
   echo "Cannot find $BUILD_DIR" ; exit 1
fi

# read build configuration from package.json
function parseJSON() {
  echo `grep $1 ${PACKAGE_JSON} | awk -F ':' '{print $2}' | tr ",\"" " "`
}
NAME=`parseJSON name`
VERSION=`parseJSON version`

# copy to server
SERVER=spot.colorado.edu
DEV_ROOT=/htdocs/physics/phet/dev/html
echo "Deploying $NAME $VERSION to $SERVER"
scp -r ${BUILD_DIR}/* ${USER_NAME}@${SERVER}:${DEV_ROOT}/${NAME}/${VERSION}

#====================================================================================================<commit_msg>Backed out fix for issue with deployment over another deployment - didn't work after testing some cases.<commit_after>#!/bin/sh -i
#====================================================================================================
#
# Deploys a dev build to spot.colorado.edu
# You must run this from the root level of your simulation repo.
# Usage: ../chipper/bin/deploy-dev.sh username
#
# Author: <NAME> (PixelZoom, Inc.)
#
#====================================================================================================

PACKAGE_JSON=./package.json
BUILD_DIR=build

# parse command line
if [ $# != 1 ]; then
   echo "Usage: deploy-dev username" ; exit 1
fi
USER_NAME=${1}

# check prerequisite files
if [ ! -f $PACKAGE_JSON ]; then
   echo "Cannot find $PACKAGE_JSON" ; exit 1
fi
if [ ! -d $BUILD_DIR ]; then
   echo "Cannot find $BUILD_DIR" ; exit 1
fi

# read build configuration from package.json
function parseJSON() {
  echo `grep $1 ${PACKAGE_JSON} | awk -F ':' '{print $2}' | tr ",\"" " "`
}
NAME=`parseJSON name`
VERSION=`parseJSON version`

# copy to server
SERVER=spot.colorado.edu
DEV_ROOT=/htdocs/physics/phet/dev/html
echo "Deploying $NAME $VERSION to $SERVER"
scp -r $BUILD_DIR ${USER_NAME}@${SERVER}:${DEV_ROOT}/${NAME}/${VERSION}

#====================================================================================================
{'fraction_non_alphanumeric': 0.34549600912200684, 'fraction_numerical': 0.005321170657544659, 'mean_word_length': 5.680203045685279, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3900947', 'n_tokens_mistral': 784, 'n_tokens_neox': 728, 'n_words': 225}