-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (43 loc) · 1.89 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
REPOS=repos
DATA=data
CREDS=creds
FRONT-END=front-end
BACK-END=back-end
TELEMETRY-BACKEND=telemetry-backend
TELEMETRY-FRONTEND=telemetry-frontend
GATEWAY-SERVER=gateway-server
PUBLISHER=publisher
RABBITMQ=rabbitmq
make: clone
deps:
@mkdir -p ${REPOS}
@mkdir -p ${DATA} && chmod -R 777 ${DATA}
# TODO: shoul change this permission
@mkdir -p ${CREDS} && chmod -R 777 ${CREDS}
clone: deps
@git clone https://github.com/smswithoutborders/smswithoutborders.com.git ${REPOS}/${FRONT-END} & \
git clone https://github.com/smswithoutborders/SMSwithoutborders-BE.git ${REPOS}/${BACK-END} & \
git clone https://github.com/smswithoutborders/SMSWithoutBorders-Gateway-Server.git \
${REPOS}/${GATEWAY-SERVER} & \
git clone https://github.com/smswithoutborders/SMSWithoutBorders-Publisher.git ${REPOS}/${PUBLISHER} & \
git clone https://github.com/smswithoutborders/SMSWithoutBorders-RabbitMQ.git ${REPOS}/${RABBITMQ} & \
git clone https://github.com/smswithoutborders/SMSWithoutBorders-Telemetry-BE.git ${REPOS}/${TELEMETRY-BACKEND} & \
git clone https://github.com/smswithoutborders/SMSWithoutBorders-Telemetry-FE.git ${REPOS}/${TELEMETRY-FRONTEND}
staging: clone
@git -C ${REPOS}/${FRONT-END} checkout staging
@git -C ${REPOS}/${BACK-END} checkout staging
@git -C ${REPOS}/${GATEWAY-SERVER} checkout staging
@git -C ${REPOS}/${PUBLISHER} checkout staging
@git -C ${REPOS}/${TELEMETRY-BACKEND} checkout staging
@git -C ${REPOS}/${TELEMETRY-FRONTEND} checkout staging
update:
@git -C ${REPOS}/${FRONT-END} pull -r origin staging
@git -C ${REPOS}/${BACK-END} pull -r origin staging
@git -C ${REPOS}/${GATEWAY-SERVER} pull origin staging
@git -C ${REPOS}/${PUBLISHER} pull origin staging
@git -C ${REPOS}/${TELEMETRY-BACKEND} pull origin staging
@git -C ${REPOS}/${TELEMETRY-FRONTEND} pull origin staging
fuckit:
docker rm -vf $(docker ps -aq)
docker rmi -f $(docker images -aq)
docker system prune -a --volumes