forked from sschmid/Entitas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildPackage.sh
executable file
·47 lines (37 loc) · 913 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
#!/bin/sh
./runTests.sh
if [ $? = 0 ]
then
echo "*** BUILDING PACKAGE"
BIN_DIR="bin"
TMP_DIR=$BIN_DIR"/tmp"
ES="Entitas"
CG=$ES".CodeGenerator"
ESU=$ES".Unity"
UCG=$ESU".CodeGenerator"
UVD=$ESU".VisualDebugging"
echo "*** CLEAN"
rm -rf $BIN_DIR
echo "*** CREATE FOLDERS"
mkdir $BIN_DIR
mkdir $TMP_DIR
echo "*** COPY SOURCES"
cp -r {$ES"/"$ES,$CG"/"$CG,$ESU"/Assets/"$ESU,$UCG"/Assets/"$UCG,$UVD"/Assets/"$UVD} $TMP_DIR
cp RELEASE_NOTES.md ${TMP_DIR}/RELEASE_NOTES.md
cp README.md ${TMP_DIR}/README.md
echo "*** DELETE GARBAGE"
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 FOLDER"
rm -rf $TMP_DIR
echo "*** DONE ***"
else
echo "ERROR: Tests didn't pass!"
exit 1
fi