forked from gratipay/gratipay.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
76 lines (62 loc) · 2.14 KB
/
Makefile
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
python := "$(shell { command -v python2.7 || command -v python; } 2>/dev/null)"
# Set the relative path to installed binaries under the project virtualenv.
# NOTE: Creating a virtualenv on Windows places binaries in the 'Scripts' directory.
bin_dir := $(shell $(python) -c 'import sys; bin = "Scripts" if sys.platform == "win32" else "bin"; print(bin)')
env_bin := env/$(bin_dir)
venv := "./vendor/virtualenv-1.9.1.py"
env: $(env_bin)/swaddle
$(python) $(venv)\
--unzip-setuptools \
--prompt="[gittip] " \
--never-download \
--extra-search-dir=./vendor/ \
--distribute \
./env/
./$(env_bin)/pip install -r requirements.txt
./$(env_bin)/pip install ./vendor/nose-1.1.2.tar.gz
./$(env_bin)/pip install -e ./
$(env_bin)/swaddle:
$(python) $(venv)\
--unzip-setuptools \
--prompt="[gittip] " \
--never-download \
--extra-search-dir=./vendor/ \
--distribute \
./env/
./$(env_bin)/pip install -r requirements.txt
./$(env_bin)/pip install ./vendor/nose-1.1.2.tar.gz
./$(env_bin)/pip install -e ./
clean:
rm -rf env *.egg *.egg-info tests/env gittip.css
find . -name \*.pyc -delete
local.env:
echo "Creating a local.env file ..."
echo
cp default_local.env local.env
clouddb: local.env
echo DATABASE_URL=`./$(env_bin)/python -c 'import requests; print requests.get("http://api.postgression.com/").text'` >> local.env
run: env local.env
./$(env_bin)/swaddle local.env ./$(env_bin)/aspen \
--www_root=www/ \
--project_root=. \
--show_tracebacks=yes \
--changes_reload=yes \
--network_address=:8537
test: env tests/env data
./$(env_bin)/swaddle tests/env ./$(env_bin)/nosetests ./tests/
tests: test
jstest:
./node_modules/.bin/karma start karma-unit.conf.js
./$(env_bin)/python jstests/scripts/e2e_runner.py
tests/env:
echo "Creating a tests/env file ..."
echo
cp default_tests.env tests/env
data: env
./makedb.sh gittip-test gittip-test
./$(env_bin)/swaddle tests/env ./$(env_bin)/python ./gittip/testing/__init__.py
fake_data: env local.env
./$(env_bin)/swaddle local.env ./$(env_bin)/fake_data fake_data
css:
scss -t compressed templates/gittip.scss gittip.css
mv gittip.css www/assets/%version/gittip.css