-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·51 lines (43 loc) · 1.12 KB
/
build.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
#!/bin/sh
project="vastan"
filename="$project"
unity_exe="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
options="-batchmode -nographics -silent-crashes -projectPath $(pwd)/$project"
workspace="$(pwd)/Build"
packages="$(pwd)/Package"
myhome="$(pwd)"
commit=`echo $TRAVIS_COMMIT | head -c 7`
mkdir $workspace
mkdir $packages
build_for_target()
{
target=$1
unitytarget=$2
extension=$3
echo "Attempting to build $project for $target"
$unity_exe \
$options \
-logFile $(pwd)/Build/$target/build.log \
-$unitytarget "$workspace/$target/$filename.$extension" \
-quit
cd $workspace
zip -r9 $packages/$project-$target-$commit.zip $target
cd $myhome
}
build_for_target windows buildWindowsPlayer exe
build_for_target osx buildOSXUniversalPlayer app
build_for_target linux buildLinuxUniversalPlayer exe
find $packages
notify()
{
(
echo NICK vastanbuilds
echo USER vastanbuilds 8 x : Notifier
sleep 1
echo 'JOIN #avaraline'
echo 'PRIVMSG #avaraline' $1
echo 'PART #avaraline'
echo 'PRIVMSG #vastan' $1
echo quit
) | nc avaraline.net 6667
}