Based on Kevin van Zonneveld’s (@kvz) article on setting up Octopress,
I’ve adapted a
Makefile to make building my blog easier… with
make. The following
Makefile allows me to build and deploy my blog
make blog at the command prompt.
all: blog preview: bundle exec rake generate && bundle exec rake preview blog: git pull && \ bundle install && \ bundle exec rake integrate && \ bundle exec rake generate && \ bundle exec rake deploy && \ git add .; \ git commit -am "blog update $$(date +%Y-%m-%d)"; \ git push origin source .PHONY: blog # Force blog to run regardless of the changes to the files.
rake build didn’t work for me
I think this is because I haven’t written any tasks that use
Remote for the source of my blog
I push the source code of my blog to a branch named
The percent symbol screwed everything up
Not sure exactly why, but including the
% after blog on the line
.PHONY: blog% gave me an error saying
make: `blog' is up to date..
% allowed me to run
make blog as expected.