Get correct commit SHA

This commit is contained in:
Oliver Davies 2017-07-25 19:01:17 +01:00
parent e91176876c
commit 9986ffd2ae

View file

@ -5,6 +5,7 @@ set -e
SITE_ENV="prod"
REPO=`git config remote.origin.url`
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
SHA=`git rev-parse --verify HEAD`
BUILD_DIR="_deploy"
# Prepare the build directory.
@ -24,6 +25,6 @@ pushd $BUILD_DIR
mv ../output_prod/* .
git config --local user.email oliver@oliverdavies.uk
git add -A .
git commit -m "Re-generate site: `git rev-parse --verify HEAD`"
git commit -m "Re-generate site: $SHA"
git push $SSH_REPO master
popd