to deploy:

npm run build-client
aws s3 cp ./build s3://ididio.com --recursive --cache-control max-age=604800 --profile ididio_loader

check that the required data exists at data.ididio.com.  In the ididio.com/client directory run:

find . -name 'dataVersions.js' -exec egrep ": +{|: +'" {} \; | gawk -F \: '{if( $2 ~ /\{/ ) { dir=$1 } else { print dir"/"$1"/"$2 } }' | tr -d " ',\r" | sort -u > ./datadirs.txt
for f in `cat ./datadirs.txt`; do echo -n $f' '; aws s3 ls data.ididio.com/$f --profile ididio_loader | wc -l; done

run ./scripts/s3copy entities/cips/20190304 >& ./logs/20190304.cips.log

to copy each of the missing directories.


<NEEDS WORK>
  to get the list of types/dates that are present in the dataVersions.js files.  To find out which files
  are using different versions run:

find . -name 'dataVersions.js' -exec grep -H ':' {} \; | grep source
</NEEDS WORK>

Check to see if a data directory is on S3

aws s3 ls data.ididio.com/entities/schools/20180906 --profile ididio_loader | wc -l

If this is 0 then the directory doesn't exist and will need to be copied.



then invalidate the data on cloudfront
