2 # make a release of a Samba library
4 GPG_USER='Samba Library Distribution Key <samba-bugs@samba.org>'
7 if [ ! -d ".git" ]; then
8 echo "Run this script from the top-level directory in the"
14 echo "Usage: librelease.sh <LIBNAMES>"
26 echo "Releasing library $lib"
28 echo "building release tarball"
29 tgzname=$(make dist 2>&1 | grep ^Created | cut -d' ' -f2)
30 [ -f "$tgzname" ] || {
31 echo "Failed to create tarball"
34 tarname=$(basename $tgzname .gz)
35 echo "Tarball: $tarname"
36 gunzip -f $tgzname || exit 1
37 [ -f "$tarname" ] || {
38 echo "Failed to decompress tarball $tarname"
42 tagname=$(basename $tarname .tar)
43 echo "tagging as $tagname"
44 git tag -u $GPG_KEYID -s "$tagname" -m "$lib: tag release $tagname" || {
50 gpg -u "$GPG_USER" --detach-sign --armor $tarname || {
53 [ -f "$tarname.asc" ] || {
54 echo "Failed to create signature $tarname.asc"
59 [ -f "$tgzname" ] || {
60 echo "Failed to compress $tgzname"
64 echo "Push git tag $tagname"
65 git push ssh://git.samba.org/data/git/samba.git refs/tags/$tagname:refs/tags/$tagname || {
69 echo "Transferring for FTP"
70 rsync -Pav $tarname.asc $tgzname master.samba.org:~ftp/pub/$lib/ || {
73 rsync master.samba.org:~ftp/pub/$lib/$tarname.*
80 talloc | tdb | tevent)
81 release_lib $lib "lib/$lib"
84 release_lib $lib "source4/lib/$lib"
87 echo "Unknown library $lib"