forked from sschmid/Entitas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildPackage.sh
executable file
·49 lines (39 loc) · 1007 Bytes
/
buildPackage.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
#!/bin/sh
./runTests.sh
if [ $? = 0 ]
then
echo "Build package"
BIN_DIR="bin"
TMP_DIR=$BIN_DIR"/tmp"
ES="Entitas"
CG=$ES".CodeGenerator"
ESU=$ES".Unity"
UCG=$ESU".CodeGenerator"
UVD=$ESU".VisualDebugging"
MIG=$ES."Migration"
echo " Clean bin"
rm -rf $BIN_DIR
echo " Create folder structure"
mkdir $BIN_DIR
mkdir $TMP_DIR
echo " Copy sources to temp"
cp -r {$ES"/"$ES,$CG"/"$CG,$ESU"/Assets/"$ESU,$UCG"/Assets/"$UCG,$UVD"/Assets/"$UVD} $TMP_DIR
cp $MIG"/bin/Release/Entitas.Migration.exe" ${TMP_DIR}"/MigrationAssistant.exe"
cp RELEASE_NOTES.md ${TMP_DIR}/RELEASE_NOTES.md
cp README.md ${TMP_DIR}/README.md
echo " Remove ignored files"
find "./"$TMP_DIR -name "*.meta" -type f -delete
find "./"$TMP_DIR -name "*.DS_Store" -type f -delete
echo " Create zip archive"
cd $TMP_DIR
zip -rq ../Entitas.zip ./
cd -
echo " Copy temp to bin"
cp -r $TMP_DIR"/." $BIN_DIR
echo " Delete temp"
rm -rf $TMP_DIR
echo "Done."
else
echo "ERROR: Tests didn't pass!"
exit 1
fi