-
Notifications
You must be signed in to change notification settings - Fork 0
/
clone.sh
88 lines (73 loc) · 2.27 KB
/
clone.sh
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
#!bin/bash
set -o allexport
source .env
set +o allexport
addressDir="./address-service"
ecoDir="./eco-service"
productDir="./product-service"
routingDir="./routing-service"
assessmentDir="./assessment-service"
vroomDir="./vroom-service"
if [ -d "$addressDir/.git" ]; then
echo "Performing git pull in $addressDir..."
cd "$addressDir"
git pull
cd ..
else
echo "Performing git clone in $addressDir..."
git clone -b mono https://$GITLAB_USERNAME:[email protected]/csdts-umich/af_address_scraping.git "$addressDir"
fi
if [ -d "$ecoDir/.git" ]; then
echo "Performing git pull in $ecoDir..."
cd "$ecoDir"
git pull
cd ..
else
echo "Performing git clone in $ecoDir..."
git clone -b mono https://$GITLAB_USERNAME:[email protected]/csdts-umich/artisanalfutures-eco-social-calc.git "$ecoDir"
cd eco-service/data/USEEIO && git lfs install && git lfs pull
cd ../../../
fi
if [ -d "$productDir/.git" ]; then
echo "Performing git pull in $productDir..."
cd "$productDir"
git pull
cd ..
else
echo "Performing git clone in $productDir..."
git clone -b dev https://$GITLAB_USERNAME:[email protected]/csdts-umich/csdt-misc/product-search.git "$productDir"
fi
if [ -d "$routingDir/.git" ]; then
echo "Performing git pull in $routingDir..."
cd "$routingDir"
git pull
cd ..
else
echo "Performing git clone in $routingDir..."
git clone -b main https://[email protected]/CSDTs/af-routing-service.git "$routingDir"
fi
if [ -d "$assessmentDir/.git" ]; then
echo "Performing git pull in $assessmentDir..."
cd "$assessmentDir"
git pull
cd ..
else
echo "Performing git clone in $assessmentDir..."
git clone -b mono https://$GITLAB_USERNAME:[email protected]/csdts-umich/csdt-misc/product-search-with-eco-social.git "$assessmentDir"
fi
if [ -d "$vroomDir/.git" ]; then
echo "Performing git pull in $vroomDir..."
cd "$vroomDir"
git pull
cd ..
else
echo "Performing git clone in $vroomDir..."
git clone -b main https://[email protected]/CSDTs/vroom-routing-service-af.git "$vroomDir"
fi
# if which docker-compose >/dev/null 2>&1; then
# echo "docker-compose is installed."
# docker-compose build
# docker-compose up
# else
# echo "docker-compose is not installed."
# fi