#!/bin/bash

# Publish site changes to staging site

URL="staging.openbudgetoakland.org"
FILE="../_staging/CNAME"
COUNTER=$((COUNTER+1))

# go to the 'source file' directory
cd _src
# compile files to 'staging' directory
harp compile ./ ../_staging
# update CNAME file with staging url
echo $URL > $FILE
# ask for description of commit
echo "Briefly describe your changes: "
read MESSAGE
# commit preview files and push to github
cd ../_staging && git add -A && git commit -m "$TIMESTAMP: $MESSAGE" && git push

#!/bin/bash

# Publish site changes to staging site

URL="staging.openbudgetoakland.org"
BASEDIR=$(dirname $0)
FILE="../_staging/CNAME"
COUNTER=$((COUNTER+1))

# go to the 'source file' directory
cd $BASEDIR/_src
# compile files to 'staging' directory
harp compile ./ ../_staging
# update CNAME file with staging url
echo $URL > $FILE
# ask for description of commit
echo "Briefly describe your changes: "
read MESSAGE
# commit preview files and push to github
cd $BASEDIR/_staging && git add -A && git commit -m "$TIMESTAMP: $MESSAGE" && git push

--- 
+++ 
@@ -3,12 +3,11 @@
 # Publish site changes to staging site
 
 URL="staging.openbudgetoakland.org"
-BASEDIR=$(dirname $0)
 FILE="../_staging/CNAME"
 COUNTER=$((COUNTER+1))
 
 # go to the 'source file' directory
-cd $BASEDIR/_src
+cd _src
 # compile files to 'staging' directory
 harp compile ./ ../_staging
 # update CNAME file with staging url
@@ -17,4 +16,4 @@
 echo "Briefly describe your changes: "
 read MESSAGE
 # commit preview files and push to github
-cd $BASEDIR/_staging && git add -A && git commit -m "$TIMESTAMP: $MESSAGE" && git push
+cd ../_staging && git add -A && git commit -m "$TIMESTAMP: $MESSAGE" && git push
: Deploy interim new flow diagram design to staging site
