forked from brigadehub/brigadehub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
125 lines (95 loc) · 2.53 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
COREPATH ?= ./node_modules/brigadehub-core
PACKAGENAME ?= suite
start:
node app.js
start/docker:
@echo make install/docker
@$(MAKE) install/docker
@echo make start
@$(MAKE) start
start/develop:
@echo make install
@$(MAKE) install
yarn run nodemon -- app.js
start/develop/mongo:
@echo make install
@$(MAKE) install
mongod -d
yarn run nodemon -- app.js
lint:
yarn run standard
link:
yarn link brigadehub-public-c4sf
yarn link brigadehub-admin-c4sf
yarn link brigadehub-core
upstream/set:
git remote add upstream https://github.com/brigadehub/brigadehub.git
upstream/sync:
git fetch upstream
git checkout master
git merge upstream/master
test:
@echo make lint
@$(MAKE) lint
@echo make test/unit
@$(MAKE) test/unit
@echo make test/e2e
@$(MAKE) test/e2e
test/unit:
echo 'no unit tests available.'
test/e2e:
# @echo make test/e2e/selenium/install
# @$(MAKE) test/e2e/selenium/install
# @echo make test/e2e/selenium/start
# @$(MAKE) test/e2e/selenium/start
echo 'no end-to-end tests available.'
test/e2e/selenium/install:
yarn run selenium-standalone install
test/e2e/selenium/start:
yarn run selenium-standalone start&
test/e2e/selenium/stop:
pkill -f selenium-standalone
db/clear:
$(COREPATH)/scripts/database-clear
db/seed:
@echo make db/bootstrap
@$(MAKE) db/bootstrap
$(COREPATH)/scripts/database-seed
db/bootstrap:
$(COREPATH)/scripts/database-bootstrap
db/migrate/up:
@echo make db/bootstrap
@$(MAKE) db/bootstrap
yarn run db-migrate -- --config $(COREPATH)/config/database.json --migrations-dir $(COREPATH)/migrations up
db/migrate/down:
@echo make db/bootstrap
@$(MAKE) db/bootstrap
yarn run db-migrate -- --config $(COREPATH)/config/database.json --migrations-dir $(COREPATH)/migrations down
install: .env
npm install -g yarn
yarn install
@echo make db/migrate/up
@$(MAKE) db/migrate/up
install/docker: .env
npm prune --production
npm rebuild --production
npm install
.env:
cp .env.example .env
install/clean:
rm -rf node_modules
@echo make install
@$(MAKE) install
build/docker:
docker build -t brigadehub/$(PACKAGENAME) .
build/docker/run:
docker run -d --name brigadehub -p 80:5465 -e MONGODB=mongodb://192.168.99.100:27017/brigadehub-docker brigadehub/$(PACKAGENAME)
build/docker/images:
docker images brigadehub/$(PACKAGENAME)
build/docker/tag:
echo "docker tag hash brigadehub/$(PACKAGENAME):release"
build/docker/push:
docker push brigadehub/$(PACKAGENAME)
build/docker/untag:
echo "docker rmi brigadehub/$(PACKAGENAME):release"
.PHONY: start lint test db install build link upstream