2010-03-01 04:19:04 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
vers=`grep AM_INIT_AUTOMAKE configure.ac | head -1 | cut '-d ' -f 2 | sed 's/)//'`
|
|
|
|
echo vers $vers
|
|
|
|
|
|
|
|
repo=$1
|
|
|
|
force=$2
|
|
|
|
|
2010-05-05 22:26:45 +00:00
|
|
|
[ -z "$repo" ] && echo stable or testing or unstable && exit 1
|
2010-03-01 04:19:04 +00:00
|
|
|
|
|
|
|
if git diff --quiet ; then
|
|
|
|
echo repository is clean
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo "**** REPOSITORY IS DIRTY ****"
|
|
|
|
echo
|
|
|
|
if [ "$force" != "force" ]; then
|
|
|
|
echo "add 'force' argument if you really want to continue."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "forcing."
|
|
|
|
fi
|
|
|
|
|
2010-07-05 23:02:28 +00:00
|
|
|
gitver=`git rev-parse HEAD 2>/dev/null | cut -c 1-8`
|
2010-03-01 04:19:04 +00:00
|
|
|
echo gitver $gitver
|
|
|
|
|
2010-05-05 22:26:45 +00:00
|
|
|
if [ "$repo" = "testing" ]; then
|
2010-03-01 04:19:04 +00:00
|
|
|
versuffix=`date "+%Y%m%d%H%M"`
|
2010-05-05 22:26:45 +00:00
|
|
|
finalvers="${vers}-testing${versuffix}-$gitver"
|
2010-03-01 04:19:04 +00:00
|
|
|
else
|
2010-05-05 22:26:45 +00:00
|
|
|
if [ "$repo" = "unstable" ]; then
|
|
|
|
versuffix=`date "+%Y%m%d%H%M"`
|
|
|
|
finalvers="${vers}-unstable${versuffix}-$gitver"
|
|
|
|
else
|
|
|
|
finalvers="$vers"
|
|
|
|
fi
|
2010-03-01 04:19:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo final vers $finalvers
|
|
|
|
|
|
|
|
echo building tarball
|
|
|
|
make dist
|
|
|
|
|
|
|
|
echo extracting
|
|
|
|
mkdir -p release/$finalvers
|
|
|
|
cd release/$finalvers
|
|
|
|
|
|
|
|
tar zxf ../../ceph-$vers.tar.gz
|
2010-07-28 20:57:43 +00:00
|
|
|
|
|
|
|
# note git version in the tarball
|
|
|
|
echo $gitver > ceph-$vers/src/.git_version
|
|
|
|
|
2010-03-01 04:19:04 +00:00
|
|
|
[ "$vers" != "$finalvers" ] && mv ceph-$vers ceph-$finalvers
|
|
|
|
tar zcf ceph_$finalvers.orig.tar.gz ceph-$finalvers
|
|
|
|
|
2010-03-10 05:38:30 +00:00
|
|
|
# add debian dir
|
|
|
|
cp -a ../../debian ceph-$finalvers
|
|
|
|
|
2010-03-01 04:19:04 +00:00
|
|
|
for dist in sid squeeze lenny
|
|
|
|
do
|
|
|
|
echo building $dist dsc
|
|
|
|
# mkdir $dist
|
|
|
|
# cd $dist
|
|
|
|
|
|
|
|
dvers="$finalvers-1"
|
|
|
|
[ "$dist" = "squeeze" ] && dvers="$dvers~bpo60+1"
|
|
|
|
[ "$dist" = "lenny" ] && dvers="$dvers~bpo50+1"
|
|
|
|
|
|
|
|
comment=""
|
|
|
|
[ -n "$versuffix" ] && comment="git snapshot "
|
|
|
|
[ "$dist" != "sid" ] && comment="${comment}$dist backport"
|
|
|
|
|
|
|
|
if [ -n "$comment" ]; then
|
|
|
|
cd ceph-$finalvers
|
2010-05-14 16:43:31 +00:00
|
|
|
DEBEMAIL="sage@newdream.net" dch -D $dist --force-distribution -b -v "$dvers" "$comment"
|
2010-03-01 04:19:04 +00:00
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
dpkg-source -b ceph-*
|
|
|
|
|
|
|
|
# cd ..
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -r ceph-$finalvers
|
|
|
|
cp -a ceph_$finalvers.orig.tar.gz ceph-$finalvers.tar.gz
|
2010-07-05 23:02:28 +00:00
|
|
|
echo finished release $finalvers
|
2010-07-08 21:27:57 +00:00
|
|
|
|
|
|
|
cd ../..
|
|
|
|
echo $finalvers > .last_release
|