script/autobuild.py: use --picky-developer for the samba-ctdb target
[sfrench/samba-autobuild/.git] / script / librelease.sh
index 7fbca88bb4d7bb8cc6dad9cbd69efc24a1cfc785..7584e481d30b935860f8a079c1b43bc5fa99e6af 100755 (executable)
@@ -1,9 +1,6 @@
 #!/bin/bash
 # make a release of a Samba library
 
-GPG_USER='Samba Library Distribution Key <samba-bugs@samba.org>'
-GPG_KEYID='13084025'
-
 if [ ! -d ".git" ]; then
        echo "Run this script from the top-level directory in the"
        echo "repository"
@@ -20,6 +17,7 @@ umask 0022
 release_lib() {
     lib="$1"
     srcdir="$2"
+    ftpdir="$3"
 
     pushd $srcdir
 
@@ -39,7 +37,7 @@ release_lib() {
        exit 1
     }
 
-    tagname=$(basename $tarname .tar | sed s/[\.]/-/g)
+    tagname=$(basename $tarname .tar)
     echo "tagging as $tagname"
     git tag -u $GPG_KEYID -s "$tagname" -m "$lib: tag release $tagname" || {
        exit 1
@@ -61,22 +59,49 @@ release_lib() {
        exit 1
     }
 
-    echo "Transferring"
-    rsync -Pav $tarname.asc $tgzname master.samba.org:~ftp/pub/$lib/ || {
+    [ -z "$ftpdir" ] && {
+        popd
+        return 0
+    }
+
+    echo "Push git tag $tagname"
+    git push ssh://git.samba.org/data/git/samba.git refs/tags/$tagname:refs/tags/$tagname || {
+       exit 1
+    }
+
+    echo "Transferring for FTP"
+    rsync -Pav $tarname.asc $tgzname master.samba.org:~ftp/pub/$ftpdir/ || {
        exit 1
     }
-    rsync master.samba.org:~ftp/pub/$lib/$tarname.*
+    rsync master.samba.org:~ftp/pub/$ftpdir/$tarname.*
 
     popd
 }
 
 for lib in $*; do
     case $lib in
-       talloc | tdb | tevent)
-           release_lib $lib "lib/$lib"
+       talloc | tdb | ntdb | tevent | ldb)
+           [ -z "$GPG_USER" ] && {
+               GPG_USER='Samba Library Distribution Key <samba-bugs@samba.org>'
+           }
+
+           [ -z "$GPG_KEYID" ] && {
+               GPG_KEYID='13084025'
+           }
+
+           release_lib $lib "lib/$lib" $lib
            ;;
-       ldb)
-           release_lib $lib "source4/lib/$lib"
+       samba)
+           [ -z "$GPG_USER" ] && {
+               GPG_USER='6568B7EA'
+           }
+
+           [ -z "$GPG_KEYID" ] && {
+               GPG_KEYID='6568B7EA'
+           }
+
+           # for now we don't upload
+           release_lib $lib "." ""
            ;;
        *)
            echo "Unknown library $lib"