-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (32 loc) · 1.24 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
WEEK_IN_CONGRESS_LOCATION = $(shell pwd)
GENERATED_FILES = \
LIBRARY_FILES = \
public/lib/underscore-min.js \
public/lib/jquery-1.10.2.min.js \
public/lib/moment.min.js \
public/lib/moment-timezone.min.js \
all: $(GENERATED_FILES) $(LIBRARY_FILES)
clean:
rm -rf build
rm -rf $(GENERATED_FILES) $(LIBRARY_FILES)
install:
virtualenv venv
. venv/bin/activate; pip install -r requirements.txt
touch week-in-congress.log
cp scripts/settings.example.py scripts/settings.py
echo 'Please enter secrets into scripts/settings.py'
start:
export WEEK_IN_CONGRESS_LOCATION=$(WEEK_IN_CONGRESS_LOCATION)
echo 'WEEK_IN_CONGRESS_LOCATION=$(WEEK_IN_CONGRESS_LOCATION)' > week-in-congress-cron
echo '* 4 * * * ubuntu $(WEEK_IN_CONGRESS_LOCATION)/venv/bin/python $(WEEK_IN_CONGRESS_LOCATION)/scripts/run.py\n' >> week-in-congress-cron
cp week-in-congress-cron /etc/cron.d/
log:
tail -f week-in-congress.log
public/lib/underscore-min.js:
curl http://underscorejs.org/underscore-min.js -o $@
public/lib/jquery-1.10.2.min.js:
curl http://code.jquery.com/jquery-1.10.2.min.js -o $@
public/lib/moment.min.js:
curl http://momentjs.com/downloads/moment.min.js -o $@
public/lib/moment-timezone.min.js:
curl http://momentjs.com/downloads/moment-timezone.min.js -o $@