[PATCH 2 of 3 website] Makefile: update makefile to not mention blatter

Augie Fackler raf at durin42.com
Fri Dec 23 11:08:11 EST 2016


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1482509145 18000
#      Fri Dec 23 11:05:45 2016 -0500
# Node ID 4d7de32b44efc1a385466e9bbafe4ac5a2177c34
# Parent  94ad26ab1689f6ef011779a10c91cc4c87bfd3bc
Makefile: update makefile to not mention blatter

Now instead of trying to use blatter, it offers a 'serve' target which
bootstraps a virtualenv (if needed) and runs the flask app in debug
mode.

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -1,5 +1,6 @@
 syntax: glob
 *.pyc
 .DS_Store
+.env
 
 out/**
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,4 @@
-all:: build
-
-build:
-	python ../blatter/blatter/__init__.py blat
+all:: serve
 
 deploy-ssh:
 	ssh selenic 'cd /home/hg/www && hg pull -u'
@@ -9,7 +6,11 @@ deploy-ssh:
 deploy:
 	cd /home/hg/www && hg pull -u
 
-serve:
-	python ../blatter/blatter/__init__.py serve
+serve: .env
+	HGWEBSITE_DEBUG=1 .env/bin/python hgwebsite.py
+
+.env:
+	python -m virtualenv .env
+	.env/bin/pip install flask
 
 .PHONY: build deploy-ssh deploy serve


More information about the Mercurial-devel mailing list