-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild_linux.sh
executable file
·76 lines (68 loc) · 2.06 KB
/
build_linux.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
#!/bin/bash
QTBINPATH=/home/subutai/qt_static/bin
BRANCH=$1
TRAYDIR=/home/travis/build/subutai-io/control-center
MAINTAINER="Jenkins Admin"
MAINTAINER_EMAIL="[email protected]"
PROD_URL=https://cdn.subutai.io:8338/kurjun/rest
#QTBINPATH=/home/travis/build/subutai-io/qt_static/bin/:$QTBINPATH
export PATH=$QTBINPATH:$PATH
qmake --version
git checkout -- .
git pull
git checkout $BRANCH
git pull origin $BRANCH
./generate_changelog --maintainer="$MAINTAINER" --maintainer-email="$MAINTAINER_EMAIL"
#./build_linux.sh "$QTBINPATH" "$BRANCH" "$TRAYDIR" "$MAINTAINER" "$MAINTAINER_EMAIL"
nproc_count="$(nproc)"
core_number=$((nproc_count*2+1))
subutai_control_center_bin="subutai_control_center_bin"
if [ -d "$subutai_control_center_bin" ]; then
echo "Try to remove subutai_control_center_bin"
rm -rf subutai_control_center_bin
fi
mkdir subutai_control_center_bin
cd subutai_control_center_bin
lrelease ../SubutaiControlCenter.pro
qmake ../SubutaiControlCenter.pro -r -spec linux-g++
make -j$core_number
rm *.o *.cpp *.h
mv ../*.qm .
cd ../
PKGNAME="subutai-control-center.deb"
case $BRANCH in
dev)
PKGNAME="subutai-control-center-dev.deb"
;;
master)
PKGNAME="subutai-control-center-master.deb"
;;
head)
PKGNAME="subutai-control-center.deb"
;;
HEAD)
PKGNAME="subutai-control-center.deb"
;;
esac
if [ $? -eq 0 ]; then
cd deb-packages/deb-packages-internal
./clear.sh
./pack_debian.sh
cd ../..
#todo upload *.deb as $PKGNAME to kurjun
cd ..
else
echo "FAILED TO BUILD"
exit 1
fi
wd=./
if [ ! -z "$TRAVIS" ]; then
wd=$HOME/build/subutai-io/control-center
fi
cd $wd/subutai_control_center_bin
cp $wd/deb-packages/*.deb $wd/subutai_control_center_bin/$PKGNAME
cp $wd/deb-packages/*.deb /tmp/$PKGNAME
#cp $wd/control-center/deb-packages/deb-packages-internal/debian/SubutaiControlCenter/bin/subutai-control-center .
#cp $wd/control-center/deb-packages/deb-packages-internal/debian/SubutaiControlCenter/bin/subutai-control-center /tmp/SubutaiControlCenter
#cp subutai-control-center /tmp/SubutaiControlCenter
#mv subutai-control-center SubutaiControlCenter