Added build.sh

This commit is contained in:
Oliver Davies 2015-04-09 00:00:23 +01:00
parent 58abcaf499
commit 029b31b3b1
2 changed files with 30 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/gh-pages-deployment/
/output_*/
/source/components/
/.sculpin/

29
build.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
set -x
SCULPIN='/usr/local/bin/sculpin'
ENV='prod'
REPO='git@github.com:opdavies/opdavies.github.io.git'
DEPLOY_DIR='./gh-pages-deployment'
BRANCH='master'
rm -rf ./output_${ENV}
${SCULPIN} generate --env=${ENV}
LOG=$(git log --oneline -n 1)
rm -rf ${DEPLOY_DIR}
git clone ${REPO} ${DEPLOY_DIR}
pushd ${DEPLOY_DIR}
git checkout -B ${BRANCH}
cp -R ../output_${ENV}/* ./
git add -A .
git commit -m "${LOG}"
git push origin ${BRANCH} --force
popd