2 # make a release of a Samba library
4 GPG_USER
='Samba Library Distribution Key <samba-bugs@samba.org>'
6 if [ ! -d ".git" ]; then
7 echo "Run this script from the top-level directory in the"
13 echo "Usage: librelease.sh <LIBNAMES>"
24 echo "Releasing library $lib"
26 echo "building release tarball"
27 tgzname
=$
(make dist
2>&1 |
grep ^Created | cut
-d' ' -f2)
28 [ -f "$tgzname" ] ||
{
29 echo "Failed to create tarball"
32 tarname
=$
(basename $tgzname .gz
)
33 echo "Tarball: $tarname"
34 gunzip
-f $tgzname ||
exit 1
35 [ -f "$tarname" ] ||
{
36 echo "Failed to decompress tarball $tarname"
40 tagname
=$
(basename $tarname .
tar |
sed s
/[\.
]/-/g
)
41 echo "tagging as $tagname"
42 git tag
-s "$tagname" -m "$lib: tag release $tagname"
46 gpg
-u "$GPG_USER" --detach-sign --armor $tarname ||
exit 1
47 [ -f "$tarname.asc" ] ||
{
48 echo "Failed to create signature $tarname.asc"
53 [ -f "$tgzname" ] ||
{
54 echo "Failed to compress $tgzname"
59 rsync
-Pav $tarname.asc
$tgzname master.samba.org
:~ftp
/pub
/$lib/
66 talloc | tdb | tevent
)
67 release_lib
$lib "lib/$lib"
70 release_lib
$lib "source4/lib/$lib"
73 echo "Unknown library $lib"