Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 48 lines (37 sloc) 1.298 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
HERE = $(shell pwd)
BIN = $(HERE)/bin
PYTHON = $(BIN)/python

INSTALL = $(BIN)/pip install --no-deps
VTENV_OPTS ?= --distribute
ES_VERSION ?= 0.20.6

BUILD_DIRS = bin build elasticsearch include lib lib64 man share


.PHONY: all test testjs

all: build

$(PYTHON):
virtualenv $(VTENV_OPTS) .

build: $(PYTHON) elasticsearch
$(INSTALL) -r requirements/prod.txt
$(INSTALL) -r requirements/dev.txt
$(INSTALL) -r requirements/test.txt
$(PYTHON) setup.py develop

clean:
rm -rf $(BUILD_DIRS)

test: build
$(BIN)/nosetests -s -d -v --with-coverage --cover-package monolith monolith

testjs: build
rm -rf elasticsearch/data/monotest/
elasticsearch/bin/elasticsearch -p es.pid
bin/pserve --pid-file monolith.pid --daemon monolith/web/tests/monolith.ini
sleep 10
$(BIN)/python tools/create_es.py 9998
-testacular start --single-run
kill `cat es.pid`
kill `cat monolith.pid`
rm -f es.pid
rm -f monolith.pid

elasticsearch:
curl -C - --progress-bar http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$(ES_VERSION).tar.gz | tar -zx
mv elasticsearch-$(ES_VERSION) elasticsearch
chmod a+x elasticsearch/bin/elasticsearch
mv elasticsearch/config/elasticsearch.yml elasticsearch/config/elasticsearch.in.yml
cp elasticsearch.yml elasticsearch/config/elasticsearch.yml
Something went wrong with that request. Please try again.