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>"
25 echo "Releasing library $lib"
27 echo "building release tarball"
28 tgzname=$(make dist 2>&1 | grep ^Created | cut -d' ' -f2)
29 [ -f "$tgzname" ] || {
30 echo "Failed to create tarball"
33 tarname=$(basename $tgzname .gz)
34 echo "Tarball: $tarname"
35 gunzip -f $tgzname || exit 1
36 [ -f "$tarname" ] || {
37 echo "Failed to decompress tarball $tarname"
41 tagname=$(basename $tarname .tar | sed s/[\.]/-/g)
42 echo "tagging as $tagname"
43 git tag -u $GPG_KEYID -s "$tagname" -m "$lib: tag release $tagname"
47 gpg -u "$GPG_USER" --detach-sign --armor $tarname || exit 1
48 [ -f "$tarname.asc" ] || {
49 echo "Failed to create signature $tarname.asc"
54 [ -f "$tgzname" ] || {
55 echo "Failed to compress $tgzname"
60 rsync -Pav $tarname.asc $tgzname master.samba.org:~ftp/pub/$lib/
67 talloc | tdb | tevent)
68 release_lib $lib "lib/$lib"
71 release_lib $lib "source4/lib/$lib"
74 echo "Unknown library $lib"