-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild_deb.sh
executable file
·60 lines (51 loc) · 1.51 KB
/
build_deb.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
BRANCH=$1
export MAINTAINER="Jenkins Admin"
export MAINTAINER_EMAIL="[email protected]"
#export TRAYDIR=/tmp/jenkins_slave/workspace/tag.builders/tray_linux.subutai-io.tag
export QTBINPATH=/home/builder/qt_static/bin/
export PATH=$QTBINPATH:$PATH
export cc_version="$(git describe --abbrev=0 --tags)+$(date +%Y%m%d%H%M%S)"
export workspace="$(pwd)"
echo $workspace
rm -rf /home/builder/deb_repo/
mkdir /home/builder/deb_repo
cd $workspace
qmake --version
git checkout -- .
git pull
git checkout $BRANCH
git pull origin $BRANCH
./generate_changelog --maintainer="$MAINTAINER" --maintainer-email="$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 ../
case $BRANCH in
dev)
PKGNAME="subutai-control-center-dev$cc_version.deb"
;;
master)
PKGNAME="subutai-control-center-master$cc_version.deb"
;;
esac
cd deb-packages/deb-packages-internal
./clear.sh
./pack_debian.sh
cd ../..
cd /home/builder/deb_repo
ls
cp $workspace/deb-packages/*.deb .
cp $workspace/deb-packages/deb-packages-internal/debian/SubutaiControlCenter/bin/subutai-control-center .
mv *.deb $PKGNAME
mv subutai-control-center SubutaiControlCenter