Added build.sh
This commit is contained in:
parent
58abcaf499
commit
029b31b3b1
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
/gh-pages-deployment/
|
||||||
/output_*/
|
/output_*/
|
||||||
/source/components/
|
/source/components/
|
||||||
/.sculpin/
|
/.sculpin/
|
||||||
|
|
29
build.sh
Executable file
29
build.sh
Executable 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
|
Reference in a new issue