forked from eranif/codelite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make-weekly
executable file
·61 lines (53 loc) · 1.42 KB
/
make-weekly
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
#!/bin/bash
# Keep the current folder
curdir=`pwd`
# Clear old installers
os_name=`uname -s`
no_upload=$1
# Clear old installers
os_name=`uname -s`
if [ ${os_name} == "Darwin" ]; then
echo rm -f $curdir/build-release/codelite.app.tar.gz
rm -f $curdir/build-release/codelite.app.tar.gz
fi
# Update our source tree
cd $curdir
echo "Pulling CodeLite changes..."
echo `pwd`
git pull --rebase
if [ $? -ne 0 ]; then
exit $?
fi
echo "Pulling wxCrafter changes..."
cd $curdir/wxcrafter
git pull --rebase
if [ $? -ne 0 ]; then
exit $?
fi
cd $curdir
linux_build() {
cd $curdir/$1 # cd to the build folder
echo rm -fr *.deb
rm -fr *.deb
PATH=.:$PATH cmake -DCMAKE_BUILD_TYPE=Release -DMAKE_DEB=1 -DCOPY_WX_LIBS=1 ..
make -j4 && make package
if [ "${no_upload}" != "--no-upload" ]; then
deb_file=`ls -lt *.deb|awk '{print $9;}'|head -n 1`
echo Uploading deb file ${deb_file}
scp ${deb_file} root@codelite.org:/var/www/html/downloads/codelite/wip
fi
cd $curdir
}
# Build and upload
if [ ${os_name} == "Darwin" ]; then
cd build-release
cmake -DCMAKE_BUILD_TYPE=Release .. -DWITH_PCH=1
make -j4 && make install
if [ "${no_upload}" != "--no-upload" ]; then
tar cvfz codelite.app.tar.gz codelite.app/*
scp codelite.app.tar.gz root@codelite.org:/var/www/html/downloads/codelite/wip
fi
else
linux_build build-release
linux_build build-release-gtk3
fi