diff options
author | Nick Daly <Nick.M.Daly@gmail.com> | 2013-04-23 21:44:09 -0500 |
---|---|---|
committer | Nick Daly <Nick.M.Daly@gmail.com> | 2013-04-23 21:44:09 -0500 |
commit | 3ab7d05bf32161773066a0f74c4d6fcd0fb53dd2 (patch) | |
tree | 6e841ce93a8cea6e4a677df598ac36e7a5c74541 | |
parent | f55c7a48ea534e342e6efbd4c7edaf1b1e07f61b (diff) | |
parent | f5cd610535fef296a2653e14aa7ff2b3cd72a8aa (diff) |
Add hosting and auto-archive-creation.
The makefile has three new targets:
1. hosting: Publish repository and automagically build the archives to
serve to clients.
2. current-checkout.tar.gz: Create an archive of the current project
directory.
3. current-repository.tar.gz: Create an archive of the current project
directory along with the source repository metadata so that the
archive is a full checkout of the project.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 15 |
2 files changed, 16 insertions, 0 deletions
@@ -1,3 +1,4 @@ +current-*.tar.gz *.pyc *.tiny.css data/*.log @@ -5,6 +5,11 @@ CSS=$(subst .tiny,,$(shell find themes -type f -name '*.css')) COMPRESSED_CSS := $(patsubst %.css,%.tiny.css,$(CSS)) PWD=`pwd` +# hosting variables +SLEEP_TIME=300 +EXCLUDE=--exclude=*.tar.gz --exclude=*~ $(EXCLUDE-FILES) +ALL_BUT_GZ=$(subst $(wildcard *.tar.gz),,$(wildcard *)) + ## Catch-all tagets default: predepend config dirs template css docs dbs all: default @@ -82,3 +87,13 @@ clean: @$(MAKE) -s -C templates clean rm -rf $(BUILDDIR) $(DESTDIR) rm -f predepend + +hosting: + bash start.sh & + while [ 1 ]; do make current-checkout.tar.gz current-repository.tar.gz; sleep $(SLEEP_TIME); done + +current-checkout.tar.gz: $(ALL_BUT_GZ) + tar cz $(EXCLUDE) * > current-checkout.tar.gz + +current-repository.tar.gz: $(ALL_BUT_GZ) + tar cz $(EXCLUDE) * .git > current-repository.tar.gz |