-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
70 lines (51 loc) · 2.03 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
EXTRACTDIR=-D lib -D themes/default/templates
POT=themes/default/lib/Lutim/I18N/lutim.pot
ENPO=themes/default/lib/Lutim/I18N/en.po
XGETTEXT=carton exec local/bin/xgettext.pl -u
CARTON=carton exec
LUTIM=script/lutim
REAL_LUTIM=script/application
HARNESS_PERL_SWITCHES=-MDevel::Cover=+ignore,local
HEAD := $(shell git rev-parse --abbrev-ref HEAD)
minify:
@echo "CSS concatenation"
@cd ./themes/default/public/css/ && cat bootstrap.min.css fontello.css hennypenny.css lutim.css toastify.css | csso > common.min.css
@cd ./themes/default/public/css/ && cat animation.css uploader.css markdown.css | csso > not_stats.min.css
@cd ./themes/default/public/css/ && cat photoswipe.css default-skin/default-skin.css | csso > gallery.min.css
locales:
$(XGETTEXT) $(EXTRACTDIR) -o $(POT) 2>/dev/null
$(XGETTEXT) $(EXTRACTDIR) -o $(ENPO) 2>/dev/null
podcheck:
podchecker lib/Lutim/DB/Image.pm
check-syntax:
find lib/ themes/ -name \*.pm -exec $(CARTON) perl -Ilib -c {} \;
find t/ -name \*.t -exec $(CARTON) perl -Ilib -c {} \;
cover:
PERL5OPT='-Ilib' $(CARTON) cover --ignore_re '^local'
test:
@PERL5OPT='-Ilib/' HARNESS_PERL_SWITCHES='$(HARNESS_PERL_SWITCHES)' $(CARTON) -- prove -l --failures
test-junit-output:
@PERL5OPT='-Ilib/' HARNESS_PERL_SWITCHES='$(HARNESS_PERL_SWITCHES)' $(CARTON) -- prove -l --failures --formatter TAP::Formatter::JUnit > tap.xml
full-test: podcheck just-test
clean:
rm -rf lutim.db files/
dev: minify
$(CARTON) morbo $(LUTIM) --listen http://0.0.0.0:3000 --watch lib/ --watch script/ --watch themes/ --watch lutim.conf
devlog:
multitail log/development.log
prod:
$(CARTON) hypnotoad -f $(LUTIM)
prodlog:
multitail log/production.log
minion:
$(CARTON) $(REAL_LUTIM) minion worker
create-pg-test-db:
sudo -u postgres psql -f t/create-pg-testdb.sql
stats:
$(CARTON) $(LUTIM) cron stats -m production
watch:
$(CARTON) $(LUTIM) cron watch -m production
cleanfiles:
$(CARTON) $(LUTIM) cron cleanfiles -m production
cleanbdd:
$(CARTON) $(LUTIM) cron cleanbdd -m production