cullmann.io/update.sh

22 lines
489 B
Bash
Raw Normal View History

2019-04-06 17:17:57 +02:00
#!/bin/bash
# failures are evil
set -e
# update our clone
2019-04-08 16:45:33 +02:00
git submodule update --init --recursive &> /dev/null
git submodule foreach git pull -q origin master &> /dev/null
git pull -q &> /dev/null
2019-04-06 17:17:57 +02:00
# rerun hugo generator
2019-04-06 22:24:29 +02:00
# export the GIT env vars we need to have links in the footer
export GIT_COMMIT_SHA=`git rev-parse --verify HEAD`
export GIT_COMMIT_SHA_SHORT=`git rev-parse --short HEAD`
2019-04-13 23:20:08 +02:00
./hugo --minify
2019-04-06 18:29:08 +02:00
2019-04-13 18:59:02 +02:00
# copy .htaccess
cp -f static/.htaccess public
2019-04-06 18:29:08 +02:00
# current date
2019-04-06 18:30:04 +02:00
date -Iseconds