mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
335cd8f952
Otherwise the final tarball includes binaries and is huuge!
74 lines
1.7 KiB
Bash
Executable File
74 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
vers=`grep AM_INIT_AUTOMAKE configure.ac | head -1 | cut '-d ' -f 2 | sed 's/)//'`
|
|
echo vers $vers
|
|
|
|
repo=$1
|
|
arch=$2
|
|
snapshot=$3
|
|
|
|
if [ "$repo" = "unstable" ]; then
|
|
versuffix=`date "+%Y%m%d%H%M%S"`
|
|
# if [ `echo $vers | sed 's/[^\.]//g'` = ".." ]; then
|
|
# finalvers="$vers$versuffix"
|
|
# else
|
|
# finalvers="$vers.$versuffix"
|
|
# fi
|
|
finalvers="${vers}git$versuffix"
|
|
debdate=`date "+%a, %d %b %Y %X %z"`
|
|
else
|
|
finalvers="$vers"
|
|
fi
|
|
|
|
echo final vers $finalvers
|
|
|
|
echo cleanup
|
|
rm *.deb *.tar.gz *.changes *.dsc
|
|
rm -rf ceph-$vers*
|
|
|
|
echo generating git version stamp
|
|
cd src
|
|
./make_version
|
|
grep GIT_VER ceph_ver.h
|
|
cd ..
|
|
|
|
echo building tarball
|
|
make dist
|
|
|
|
echo extracting
|
|
tar zxf ceph-$vers.tar.gz
|
|
|
|
if [ "$vers" != "$finalvers" ]; then
|
|
echo "renaming ceph-$vers to ceph-$finalvers, rebuilding tarball"
|
|
mv ceph-$vers ceph-$finalvers
|
|
sed -i "s/ceph, $vers/ceph, $finalvers/" ceph-$finalvers/configure.ac
|
|
|
|
mv ceph-$finalvers/debian/changelog ceph-$finalvers/debian/changelog.tmp
|
|
cat <<EOF > ceph-$finalvers/debian/changelog
|
|
ceph ($finalvers) unstable; urgency=low
|
|
|
|
* snapshot from git at $versuffix
|
|
|
|
-- sage <sage@newdream.net> $debdate
|
|
|
|
EOF
|
|
cat ceph-$finalvers/debian/changelog.tmp >> ceph-$finalvers/debian/changelog
|
|
|
|
tar zcf ceph-$finalvers.tar.gz ceph-$finalvers
|
|
fi;
|
|
|
|
if [ "$repo" == "stable" ]; then
|
|
scp ceph-$vers.tar.gz sage@ceph.newdream.net:ceph.newdream.net/downloads
|
|
fi
|
|
|
|
cd ceph-$finalvers
|
|
./autogen.sh
|
|
dpkg-buildpackage -rfakeroot
|
|
cd ..
|
|
|
|
# upload
|
|
rsync -v --progress *$arch.{deb,changes} sage@ceph.newdream.net:debian/dists/$repo/main/binary-$arch
|
|
rsync -v --progress ceph_* sage@ceph.newdream.net:debian/dists/$repo/main/source
|
|
|
|
# rebuild index
|
|
ssh sage@ceph.newdream.net build_debian_repo.sh |