Cleanup post-receive hook

This commit is contained in:
Valentin Brandl 2017-06-05 15:37:20 +02:00
parent b5994a2caf
commit 65b57a71ae
Signed by: vbrandl
GPG Key ID: CAD4DA1A789125F9

View File

@ -13,7 +13,6 @@ rsync -aqz ${PUBLIC_WWW}/ $BACKUP_WWW
trap "echo 'A problem occurred. Reverting to backup.'; rsync -aqz --del $BACKUP_WWW/ $PUBLIC_WWW; rm -rf $WORKING_DIRECTORY" EXIT trap "echo 'A problem occurred. Reverting to backup.'; rsync -aqz --del $BACKUP_WWW/ $PUBLIC_WWW; rm -rf $WORKING_DIRECTORY" EXIT
git clone --recursive $GIT_REPO $WORKING_DIRECTORY git clone --recursive $GIT_REPO $WORKING_DIRECTORY
# cd $WORKING_DIRECTORY && git submodule update --init --recursive --remote
rm -rf $PUBLIC_WWW/* rm -rf $PUBLIC_WWW/*
$HOME/.local/bin/hugo -s $WORKING_DIRECTORY -d ${PUBLIC_WWW} -b "https://${MY_DOMAIN}" $HOME/.local/bin/hugo -s $WORKING_DIRECTORY -d ${PUBLIC_WWW} -b "https://${MY_DOMAIN}"
find $PUBLIC_WWW -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' -o -name '*.xml' -o -name '*.svg' \) -exec gzip -v -k -f --best {} \; -exec touch -r {} "{}.gz" \; find $PUBLIC_WWW -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' -o -name '*.xml' -o -name '*.svg' \) -exec gzip -v -k -f --best {} \; -exec touch -r {} "{}.gz" \;