Skip to content

Commit

Permalink
added gh-pages target to make
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Mar 26, 2012
1 parent 2ea7380 commit f5b2de1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Makefile
@@ -1,5 +1,11 @@
# TODO: try to find ttf2eot and ttfautohint globally installed first

PROJECT := $(notdir ${PWD})
TMP_PATH := /tmp/${PROJECT}-$(shell date +%s)

REMOTE_NAME ?= origin
REMOTE_REPO ?= $(shell git config --get remote.${REMOTE_NAME}.url)


TTF2EOT_BIN = ./support/ttf2eot/ttf2eot
TTFAUTOHINT_BIN = ./support/ttfautohint/frontend/ttfautohint
Expand Down Expand Up @@ -46,6 +52,23 @@ html:
./bin/parse_template.py -c ./config.yml ./src/demo.mustache ./font/demo.html


gh-pages:
@if test -z ${REMOTE_REPO} ; then \
echo 'Remote repo URL not found' >&2 ; \
exit 128 ; \
fi
cp -r ./font ${TMP_PATH} && \
touch ${TMP_PATH}/.nojekyll
cd ${TMP_PATH} && \
git init && \
git add . && \
git commit -q -m 'refreshed gh-pages'
cd ${TMP_PATH} && \
git remote add remote ${REMOTE_REPO} && \
git push --force remote +master:gh-pages
rm -rf ${TMP_PATH}


dev-deps:
@if test 0 -ne `id -u` ; then \
echo "root priveledges are required" >&2 ; \
Expand Down

0 comments on commit f5b2de1

Please sign in to comment.