Skip to content

Instantly share code, notes, and snippets.

@tpokorra
Last active December 18, 2015 00:39
Show Gist options
  • Save tpokorra/5698249 to your computer and use it in GitHub Desktop.
Save tpokorra/5698249 to your computer and use it in GitHub Desktop.
build script for nightly builds of Kolab based on git.kolab.org master; the building happens at https://obs.kolabsys.com/project/show?project=home%3Atpokorra%3Abranches%3AKolab%3ADevelopment
#!/bin/bash
eval `ssh-agent`
ssh-add ~/.ssh/id_rsa
cd ~/osc/home:tpokorra:branches:Kolab:Development
TODAY=`date +%Y%m%d`
YESTERDAY=`date -d '1 day ago' +%Y%m%d`
#YESTERDAY=20140611
if [ -f $TODAY ]
then
exit
fi
gitnames=( kolab-freebusy iRony kolab-chwala pykolab kolab-wap libkolab libkolabxml kolab-syncroton roundcubemail-plugins-kolab kolab-utils libcalendaring)
for gitname in "${gitnames[@]}"
do
echo "fetching "$gitname" .tar.gz from git.kolab.org"
pkgname=$gitname
if [[ "$pkgname" == "kolab-wap" ]]; then pkgname="kolab-webadmin"; fi
if [[ "$pkgname" == "kolab-chwala" ]]; then pkgname="chwala"; fi
cd $pkgname
osc update
sed -i "s#nightly$YESTERDAY#nightly$TODAY#g" $pkgname.dsc
sed -i "s#nightly$YESTERDAY#nightly$TODAY#g" debian.changelog
rm -f $gitname-git-master.tar.gz
while [ ! -f $gitname-git-master.tar.gz ]
do
curl --retry 10 --retry-delay 30 -f -o $gitname-git-master.tar.gz https://git.kolab.org/$gitname/snapshot/$gitname-master.tar.gz || sleep 60
done
cd ..
done
osc commit -m "nightly snapshot of $TODAY"
rm -f $YESTERDAY
touch $TODAY
kill $SSH_AGENT_PID
#!/bin/bash
eval `ssh-agent` > /dev/null 2>&1
ssh-add ~/.ssh/id_rsa > /dev/null 2>&1
cd ~/osc/home:tpokorra:branches:Kolab:Development
gitnames=( kolab-freebusy iRony kolab-chwala pykolab kolab-wap libkolab libkolabxml kolab-syncroton roundcubemail-plugins-kolab kolab-utils )
for gitname in "${gitnames[@]}"
do
pkgname=$gitname
if [[ "$pkgname" == "kolab-wap" ]]; then pkgname="kolab-webadmin"; fi
if [[ "$pkgname" == "kolab-chwala" ]]; then pkgname="chwala"; fi
cd $pkgname
result=`osc results | grep -E "CentOS_6|Debian_7.0" | grep x86_64 | grep -E "failed|unresolvable|broken"`
if [ ! -z "$result" ]
then
echo "there is a problem with result of package " $pkgname
echo $result
fi
cd ..
done
kill $SSH_AGENT_PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment