4
# Move the following variables to configuration file
5
GITDIR=$(readlink -f ../../core/)
9
FROM=libreoffice-4-0-branch-point
12
BUILDSCRIPT=$(dirname $(readlink -f $0))/build.sh
15
ARCHIVEDIR=$BASEDIR/archive
16
ARTIFACTSDIR=$BASEDIR/artifacts
17
BINREPODIR=$BASEDIR/binrepo
18
BUILDDIR=$BASEDIR/builddir
19
MILESTONEDIR=$BASEDIR/milestone
20
SOURCEDIR=$BASEDIR/source
21
TARFILESDIR=$BASEDIR/tarfiles
27
mkdir -p $ARTIFACTSDIR
30
mkdir -p $MILESTONEDIR
34
if [ ! -f $BASEDIR/.init ]; then
36
git --git-dir=${BINREPODIR}/.git commit --allow-empty -m 'root'
37
git --git-dir=${GITDIR}/.git branch failures
38
touch ${BASEDIR}/.init
46
git --git-dir=${BINREPODIR}/.git --work-tree=${ARTIFACTSDIR} add -A
47
git --git-dir=${BINREPODIR}/.git --work-tree=${ARTIFACTSDIR} commit -F ${ARTIFACTSDIR}/commitmsg
48
git --git-dir=${BINREPODIR}/.git tag source-hash-$2
53
echo "Building $commit"
54
rm -Rf $BUILDDIR $ARTIFACTSDIR
55
git clone -n $GITDIR $BUILDDIR
56
mkdir -p $ARTIFACTSDIR
60
echo "Calling build script"
61
$BUILDSCRIPT $BUILDDIR $ARTIFACTSDIR
64
if [ $ret -eq 0 ]; then
65
commit_artifacts master $commit success
67
commit_artifacts failures $commit failed
70
echo $commit >> $BUILDLIST
77
BUILDLIST=$BASEDIR/buildlist
80
if [ -f $BUILDLIST ];then
81
FROM=$(tail -1 $BUILDLIST)
86
#COMMITS=$(git --git-dir=${GITDIR}/.git rev-list --reverse ${FROM}..${TO} | awk "NR == $STARTAT || NR % $INCREMENT == 0")
88
#for commit in $COMMITS; do
89
# echo "Checking $commit"
90
# if ! grep -q $commit $BUILDLIST; then
91
# build_milestone $commit
96
git --git-dir=${GITDIR}/.git rev-list --reverse ${FROM}..${TO} | while read commit; do
98
if ! grep -q $commit $BUILDLIST; then
99
if [ $ROW -eq $NEXT ]; then
100
build_milestone $commit
101
if [ $? -eq 0 ]; then
102
NEXT=$((NEXT + PASS_INC))
104
NEXT=$((NEXT + FAIL_INC))