summaryrefslogtreecommitdiff
path: root/update.sh
blob: 66bc905bc531789f7d8f06a9bab939a462b46ba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

# failures are evil
set -e

# update our clone
git submodule update --init --recursive &> /dev/null
git submodule foreach git pull -q origin master &> /dev/null
git pull -q &> /dev/null

# rerun hugo generator
# 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`
./hugo --minify

# copy .htaccess
cp -f static/.htaccess public

# current date
date -Iseconds