forked from steveshogren/overseer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
104 lines (74 loc) · 2.65 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
ifeq ($(OS),Windows_NT)
LEIN=lein.bat
else
LEIN=lein
endif
philly-prod-git := [email protected]:shining-overseer.git
web-test-git := [email protected]:shining-overseer-test.git
T :
grep '^[^[:space:]].* :' makefile
# example of ls and echo
hello :
ls
@echo Done
deploy-test :
git push $(web-test-git) master
# setup-prod-demo-data :
# heroku pg:psql --app shining-overseer < demo/demo-data.sql
log-philly :
heroku logs --app shining-overseer
sql-philly :
heroku pg:psql --app shining-overseer
sql-philly-backup :
heroku pg:backups capture --app shining-overseer
curl -o latest.dump `heroku pg:backups public-url -a shining-overseer`
sql-backup-local-restore : drop-tables
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U postgres -d school_crm latest.dump
generate-sequence-reset :
psql -h localhost -U postgres -d school_crm -Atq -f reset.sql -o genreset.sql
run-sequence-reset :
psql -f genreset.sql
deploy-philly : generate-sequence-reset
echo 'do you need to run the sequence reset?'
./prod-deploy.sh $(philly-prod-git)
logs :
tail -f log/app.log
start :
${LEIN} run -m overseer.web
# ${LEIN} ring server-headless 5000
debug :
${LEIN} with-profile debug run -m overseer.web
unit-test :
${LEIN} test
test-refresh :
${LEIN} test-refresh
webdriver-test :
${LEIN} test :integration
connect-dst :
ssh [email protected] -L 5433:localhost:5432
deploy-dst : minify
${LEIN} uberjar
scp target/overseer-standalone.jar [email protected]:~/overseer-new.jar
scp dst_server/* [email protected]:~/
ssh [email protected] ./run_server.sh
# createuser jack -U postgres
# grant all privileges on database school_crm to jack;
# ALTER USER jack WITH SUPERUSER;
# insert into classes_X_students (class_id, student_id) select 1, _id from students;
drop-tables :
psql -d school_crm -c "DROP SCHEMA IF EXISTS phillyfreeschool CASCADE; DROP SCHEMA IF EXISTS overseer CASCADE; DROP SCHEMA IF EXISTS public CASCADE; CREATE SCHEMA public;"
sql-local :
psql -d school_crm
load-massive-dump : drop-tables
psql school_crm < massive.dump
load-aliased-dump : drop-tables
psql school_crm < dumps/updated-students-aliased.dump
backup-aliased-dump :
pg_dump school_crm > dumps/updated-students-aliased.dump
BABEL_CMD = -t [ babelify --presets [ es2015 react stage-1 ] ]
minify :
./node_modules/.bin/browserify $(BABEL_CMD) -t reactify -t uglifyify ./src/js/app.jsx -o ./resources/public/js/gen/app.js
js :
./node_modules/.bin/browserify $(BABEL_CMD) ./src/js/app.jsx -o ./resources/public/js/gen/app.js --debug
watch :
./node_modules/.bin/watchify -v $(BABEL_CMD) ./src/js/app.jsx -o ./resources/public/js/gen/app.js --debug