-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuildStats.sh
More file actions
28 lines (25 loc) · 809 Bytes
/
Copy pathbuildStats.sh
File metadata and controls
28 lines (25 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# Need to run after I fix api_nodetest to send the logs to cloudwatch
# bash run_cloudwatchquery.sh
#bash run cloudwatchquery_partial.sh
# Load the database connection variables (DBNAME, HOST, PORT, USER, PASSWORD)
# from the .env file rather than hardcoding them here.
if [ -f .env ]; then
set -a
source .env
set +a
else
echo "No .env file found. Copy .env-template to .env and set your values." >&2
exit 1
fi
if [ "$1" == "local" ]; then
echo "Running against the local DB ($USER@$HOST:$PORT/$DBNAME)."
Rscript -e "rmarkdown::render('StateoftheDB.Rmd')"
else
echo "Running against the remote ($USER@$HOST:$PORT/$DBNAME)."
Rscript -e "rmarkdown::render('StateoftheDB.Rmd')"
git add --all
git commit -m "Running the build"
git push
fi
echo Done.