This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/build.sh

25 lines
503 B
Bash
Raw Normal View History

2015-04-08 23:00:23 +00:00
#!/bin/bash
set -x
2015-04-09 16:07:32 +00:00
SCULPIN='/usr/local/bin/sculpin'
ENV='prod'
REPO='git@github.com:opdavies/opdavies.github.io.git'
BRANCH='master'
BUILD_DIR='./gh-pages-deployment/'
rm -rf ./output_${ENV}
${SCULPIN} generate --env=${ENV}
2015-04-08 23:00:23 +00:00
LOG=$(git log --oneline -n 1)
2015-04-09 16:07:32 +00:00
rm -rf ${BUILD_DIR}
git clone ${REPO} ${BUILD_DIR}
2015-04-08 23:00:23 +00:00
2015-04-09 16:07:32 +00:00
pushd ${BUILD_DIR}
git checkout -B ${BRANCH}
rsync --quiet --archive --filter="P .git*" --delete ../output_${ENV}/ ./
2015-04-08 23:00:23 +00:00
git add -A .
git commit -m "${LOG}"
2015-04-09 16:07:32 +00:00
git push origin ${BRANCH} --force
2015-04-08 23:00:23 +00:00
popd