[Reproducible-commits] [blog] 02/02: Add scripts for testing locally

Ximin Luo infinity0 at debian.org
Fri Apr 15 13:12:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository blog.

commit d15976e66ac0cd5f08ea4fa5a93a45cef8802eba
Author: Ximin Luo <infinity0 at debian.org>
Date:   Fri Apr 15 14:51:49 2016 +0200

    Add scripts for testing locally
---
 .gitignore |  3 +++
 Makefile   | 17 +++++++++++++++++
 blog.setup | 14 +++++++-------
 3 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index eecda60..b36aee0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
 /.ikiwiki
+
+/blog-local.setup
+/local
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2c7b33c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+all: local
+
+# build and serve locally, for testing
+# view it at http://localhost:8000/blog/
+serve: local
+	cd local && python -m SimpleHTTPServer
+
+local: blog-local.setup
+	ikiwiki --setup blog-local.setup
+
+blog-local.setup: blog.setup Makefile
+	sed -re 's/^(\S*): (.*)\s*#local:\s*(.*)$$/\1: \3/g' "$<" > "$@"
+
+clean:
+	rm -rf local blog-local.setup .ikiwiki
+
+.PHONY: all serve clean
diff --git a/blog.setup b/blog.setup
index 9cf6f22..920c777 100644
--- a/blog.setup
+++ b/blog.setup
@@ -1,10 +1,10 @@
 # IkiWiki::Setup::Yaml - YAML formatted setup file
 #
 # Setup file for ikiwiki.
-# 
+#
 # Passing this to ikiwiki --setup will make ikiwiki generate
 # wrappers and build the wiki.
-# 
+#
 # Remember to re-run ikiwiki --setup any time you edit this file.
 #
 # name of the wiki
@@ -17,9 +17,9 @@ adminemail: holger at layer-acht.org
 # users who are banned from the wiki
 banned_users: []
 # where the source of the wiki is located
-srcdir: /home/groups/reproducible/blog
+srcdir: /home/groups/reproducible/blog ##local: .
 # where to build the wiki
-destdir: /home/groups/reproducible/htdocs/blog
+destdir: /home/groups/reproducible/htdocs/blog ##local: local/blog
 # base url to the wiki
 url: https://reproducible.alioth.debian.org/blog
 # url to the ikiwiki.cgi
@@ -29,7 +29,7 @@ url: https://reproducible.alioth.debian.org/blog
 # mode for cgi_wrapper (can safely be made suid)
 cgi_wrappermode: 06755
 # rcs backend to use
-rcs: git
+rcs: git ##local:
 # plugins to add to the default configuration
 add_plugins:
 - goodstuff
@@ -105,9 +105,9 @@ allow_symlinks_before_srcdir: 1
 
 # git plugin
 # git hook to generate
-git_wrapper: /srv/git.debian.org/git/reproducible/blog.git/hooks/post-update
+git_wrapper: /srv/git.debian.org/git/reproducible/blog.git/hooks/post-update ##local:
 # shell command for git_wrapper to run, in the background
-git_wrapper_background_command: git update-server-info
+git_wrapper_background_command: git update-server-info ##local:
 # mode for git_wrapper (can safely be made suid)
 #git_wrappermode: 06755
 # git pre-receive hook to generate

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/blog.git



More information about the Reproducible-commits mailing list