forked from asebak/embeddedlinux-jvmdebugger-intellij
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci-build.sh
33 lines (31 loc) · 748 Bytes
/
ci-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
#!/bin/bash
ideaVersion="2017.1.4"
if [ ! -d ./idea-IC ]; then
# Get our IDEA dependency
if [ -f ~/Tools/ideaIC-${ideaVersion}.tar.gz ];
then
cp ~/Tools/ideaIC-${ideaVersion}.tar.gz .
else
wget http://download.jetbrains.com/idea/ideaIC-${ideaVersion}.tar.gz
fi
# Unzip IDEA
tar zxf ideaIC-${ideaVersion}.tar.gz
rm -rf ideaIC-${ideaVersion}.tar.gz
# Move the versioned IDEA folder to a known location
ideaPath=$(find . -name 'idea-IC*' | head -n 1)
mv ${ideaPath} ./idea-IC
fi
# Run Ant Build
if [ "$1" = "-d" ]; then
ant -d -f build.xml -DIDEA_HOME=./idea-IC
else
ant -f build.xml -DIDEA_HOME=./idea-IC
fi
# get build status
stat=$?
if [ "${TRAVIS}" != true ]; then
ant -f build.xml -q clean
#rm -rf idea-IC
fi
# return build status
exit ${stat}