-
Notifications
You must be signed in to change notification settings - Fork 12
/
neverwinterdp.sh
executable file
·177 lines (146 loc) · 4.57 KB
/
neverwinterdp.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#!/bin/bash
cygwin=false
case "`uname`" in
CYGWIN*) cygwin=true;;
esac
bin=`dirname "$0"`
bin=`cd "$bin"; pwd`
APP_DIR=`cd $bin/..; pwd; cd $bin`
JAVACMD=$JAVA_HOME/bin/java
if $cygwin; then
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
APP_DIR=`cygpath --absolute --windows "$APP_DIR"`
fi
function printHeader() {
echo ""
echo "****************************************************************************************"
echo ""
echo "Project: $1"
echo ""
echo "****************************************************************************************"
echo ""
echo ""
}
function runGradle() {
COMMAND=$1
shift
printHeader "NeverwinterDP-Commons"
echo "NeverwinterDP-Commons: $COMMAND $@"
cd $APP_DIR/NeverwinterDP-Commons && $COMMAND $@
printHeader "Queuengin"
echo "Queuengin: $COMMAND $@"
cd $APP_DIR/Queuengin && $COMMAND $@
printHeader "Sparkngin"
echo "Sparkngin: $COMMAND $@"
cd $APP_DIR/Sparkngin && $COMMAND $@
printHeader "Scribengin"
echo "Scribengin: $COMMAND $@"
cd $APP_DIR/Scribengin && $COMMAND $@
printHeader "DemandSpike"
echo "DemandSpike: $COMMAND $@"
cd $APP_DIR/DemandSpike && $COMMAND $@
printHeader "NeverwinterDP"
echo "NeverwinterDP: $COMMAND $@"
cd $APP_DIR/NeverwinterDP && $COMMAND $@
cd $APP_DIR
echo $@
}
function runGit() {
printHeader "NeverwinterDP-Commons"
echo "NeverwinterDP-Commons: git $@"
cd $APP_DIR/NeverwinterDP-Commons && git $@
printHeader "Queuengin"
echo "Queuengin: git $@"
cd $APP_DIR/Queuengin && git $@
printHeader "Sparkngin"
echo "Sparkngin: git $@"
cd $APP_DIR/Sparkngin && git $@
printHeader "Scribengin"
echo "Scribengin: git $@"
cd $APP_DIR/Scribengin && git $@
printHeader "DemandSpike"
echo "DemandSpike: git $@"
cd $APP_DIR/DemandSpike && git $@
printHeader "NeverwinterDP"
echo "NeverwinterDP: git $@"
cd $APP_DIR/NeverwinterDP && git $@
cd $APP_DIR
}
function release() {
echo "do release"
}
function runCheckout() {
printHeader "NeverwinterDP-Commons"
echo "NeverwinterDP-Commons: git clone https://github.com/DemandCube/NeverwinterDP-Commons.git"
if [ ! -d $APP_DIR/NeverwinterDP-Commons ] ; then
cd $APP_DIR && git clone https://github.com/DemandCube/NeverwinterDP-Commons.git
fi
printHeader "Queuengin"
echo "Queuengin: git clone https://github.com/DemandCube/Queuengin.git"
if [ ! -d $APP_DIR/Queuengin ] ; then
cd $APP_DIR && git clone https://github.com/DemandCube/Queuengin.git
fi
printHeader "Sparkngin"
echo "Sparkngin: git clone https://github.com/DemandCube/Sparkngin.git"
if [ ! -d $APP_DIR/Sparkngin ] ; then
cd $APP_DIR && git clone https://github.com/DemandCube/Sparkngin.git
fi
printHeader "Scribengin"
echo "Scribengin: git clone https://github.com/DemandCube/Scribengin.git"
if [ ! -d $APP_DIR/Scribengin ] ; then
cd $APP_DIR && git clone https://github.com/DemandCube/Scribengin.git
fi
printHeader "DemandSpike"
echo "DemandSpike: git clone https://github.com/DemandCube/DemandSpike.git"
if [ ! -d $APP_DIR/DemandSpike ] ; then
cd $APP_DIR && git clone https://github.com/DemandCube/DemandSpike.git
fi
}
COMMAND=$1
shift
if [ "$COMMAND" = "gradle" ] ; then
runGradle $COMMAND $@
elif [ "$COMMAND" = "gradlew" ] ; then
runGradle "./gradlew" $@
elif [ "$COMMAND" = "git" ] ; then
runGit $@
elif [ "$COMMAND" = "release" ] ; then
release $@
elif [ "$COMMAND" = "checkout" ] ; then
runCheckout
else
echo "This command will run git or gradle against all projects."
echo "Projects:"
echo " NeverwinterDP-Commons"
echo " Queuengin"
echo " Sparkngin"
echo " Scribengin"
echo " DemandSpike"
echo " NeverwinterDP"
echo ""
echo "Avaliable Commands: "
echo " gradle: Run gradle against all projects"
echo " git: Run git against all projects"
echo ""
echo "e.g."
echo "cd NeverwinterDP"
echo " ./neverwinterdp.sh git [pass through parameters]"
echo " ./neverwinterdp.sh gradle [pass through parameters]"
echo ""
echo "For example the command"
echo " ./neverwinterdp.sh git pull origin"
echo ""
echo "Will pull or the latest code from NeverwinterDP-Commons, Queuengin, Sparkngin, Scribengin, DemandSpike, NeverwinterDP"
echo ""
echo ""
echo " ./neverwinterdp.sh gradle clean build install"
echo ""
echo "Will clean and build code in NeverwinterDP-Commons, Queuengin, Sparkngin, Scribengin, DemandSpike, NeverwinterDP"
echo ""
echo ""
echo " ./neverwinterdp.sh checkout"
echo ""
echo "Will clone the other repos NeverwinterDP-Commons, Queuengin, Sparkngin, Scribengin, DemandSpike"
echo ""
echo ""
fi