Skip to content

Commit

Permalink
Add new publish/gh-pages rules to Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
cscott committed Jun 4, 2013
1 parent 21a8d85 commit 6f49d79
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

28 changes: 25 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
install:

build-publish:
$(MAKE) README.html
ln -sf README.html index.html
rsync -avz --exclude=.git --exclude='*~' ./ cscott.net:public_html/Projects/TurtleScript/
$(RM) -rf publish
mkdir publish
git archive --format=tar --prefix=publish/ HEAD | tar -x
# clean up
$(RM) publish/README.rst publish/.gitignore publish/Makefile
$(RM) -r publish/bin publish/test
cp README.html publish/index.html
# domain name for github pages
echo turtlescript.github.cscott.net > publish/CNAME
# turn off jekyll for github pages
touch publish/.nojekyll
# make docco
node_modules/docco/bin/docco -o publish/docco publish/*.js

install: build-publish
rsync -avz --exclude=.git --exclude='*~' publish/ cscott.net:public_html/Projects/TurtleScript/
rsync -avz --exclude=.git --exclude='*~' publish/ dev.laptop.org:public_html/TurtleScript/
$(RM) -rf clean
git clone -b gh-pages https://github.com/cscott/TurtleScript.git clean
cd clean && git rm -rf .
cp -r publish/* publish/.[a-z]* clean/
cd clean && git add . && git commit -m "Updated `date`" && \
git push origin gh-pages

README.html: README.rst
rst2html $< $@

0 comments on commit 6f49d79

Please sign in to comment.