2 # make a release of a Samba library
4 if [ ! -d ".git" ]; then
5 echo "Run this script from the top-level directory in the"
11 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)
41 echo "tagging as $tagname"
42 git tag
-u $GPG_KEYID -s "$tagname" -m "$lib: tag release $tagname" ||
{
48 gpg
-u "$GPG_USER" --detach-sign --armor $tarname ||
{
51 [ -f "$tarname.asc" ] ||
{
52 echo "Failed to create signature $tarname.asc"
57 [ -f "$tgzname" ] ||
{
58 echo "Failed to compress $tgzname"
67 echo "Push git tag $tagname"
68 git push
ssh://git.samba.org
/data
/git
/samba.git refs
/tags
/$tagname:refs
/tags
/$tagname ||
{
72 echo "Transferring for FTP"
73 rsync
-Pav $tarname.asc
$tgzname master.samba.org
:~ftp
/pub
/$ftpdir/ ||
{
76 rsync master.samba.org
:~ftp
/pub
/$ftpdir/$tarname.
*
83 talloc | tdb | ntdb | tevent | ldb
)
84 [ -z "$GPG_USER" ] && {
85 GPG_USER
='Samba Library Distribution Key <samba-bugs@samba.org>'
88 [ -z "$GPG_KEYID" ] && {
92 release_lib
$lib "lib/$lib" $lib
95 [ -z "$GPG_USER" ] && {
99 [ -z "$GPG_KEYID" ] && {
103 # for now we don't upload
104 release_lib
$lib "." ""
107 echo "Unknown library $lib"