2 # make a release of a Samba library
4 [ -z "$GPG_USER" ] && {
5 GPG_USER
='Samba Library Distribution Key <samba-bugs@samba.org>'
8 [ -z "$GPG_KEYID" ] && {
12 if [ ! -d ".git" ]; then
13 echo "Run this script from the top-level directory in the"
19 echo "Usage: librelease.sh <LIBNAMES>"
32 echo "Releasing library $lib"
34 echo "building release tarball"
35 tgzname
=$
(make dist
2>&1 |
grep ^Created | cut
-d' ' -f2)
36 [ -f "$tgzname" ] ||
{
37 echo "Failed to create tarball"
40 tarname
=$
(basename $tgzname .gz
)
41 echo "Tarball: $tarname"
42 gunzip
-f $tgzname ||
exit 1
43 [ -f "$tarname" ] ||
{
44 echo "Failed to decompress tarball $tarname"
48 tagname
=$
(basename $tarname .
tar)
49 echo "tagging as $tagname"
50 git tag
-u $GPG_KEYID -s "$tagname" -m "$lib: tag release $tagname" ||
{
56 gpg
-u "$GPG_USER" --detach-sign --armor $tarname ||
{
59 [ -f "$tarname.asc" ] ||
{
60 echo "Failed to create signature $tarname.asc"
65 [ -f "$tgzname" ] ||
{
66 echo "Failed to compress $tgzname"
70 echo "Push git tag $tagname"
71 git push
ssh://git.samba.org
/data
/git
/samba.git refs
/tags
/$tagname:refs
/tags
/$tagname ||
{
75 echo "Transferring for FTP"
76 rsync
-Pav $tarname.asc
$tgzname master.samba.org
:~ftp
/pub
/$ftpdir/ ||
{
79 rsync master.samba.org
:~ftp
/pub
/$ftpdir/$tarname.
*
86 talloc | tdb | tevent | ldb
)
87 release_lib
$lib "lib/$lib" $lib
90 release_lib
$lib "." "samba/$lib"
93 echo "Unknown library $lib"