| if grep 'localhost:4000' *.md _posts/*.md; then |
| echo "ERROR: Your content has links to localhost:4000!" >&2 |
| if [ "x$(git status --porcelain)" != "x" ]; then |
| echo -n "git repo has uncommitted changes. Continue anyway? (y/N) " >&2 |
| if [ "x$YESNO" != xy ]; then |
| case $(git rev-parse --abbrev-ref HEAD) in |
| echo "On master branch. Will generate to /next." |
| echo "On release branch. Will generate to /." |
| echo "Unrecognized branch." >&2 |
| echo "Regenerating site..." |
| rm -rf _site _site.tar.gz |
| jekyll _3.8.1_ build --safe $FUTURE --config $CONFIG |
| echo -n "Push now? (y/N)" |
| if [ "x$YESNO" == "xy" ]; then |
| tar cz --xform='s,_site/,,' _site/* | gce-ss ssh alpha2 --command "cd /var/www/capnproto.org$PREFIX && tar xz" |