]> TLD Linux GIT Repositories - packages/rpm-build-tools.git/blobdiff - kde4send2builders.sh
- allow build if requested tag matches current head
[packages/rpm-build-tools.git] / kde4send2builders.sh
index 8d5af6dffb69c92a417134ba847e3f87edb800a1..5a42d931524967aab752adddeef46e7ef97dadb7 100755 (executable)
@@ -16,13 +16,15 @@ usage() {
        echo "  -b   --builder VALUE"
        echo "     choose a particular builder, default all"
        echo "  -p   --priority VALUE (default: 2)"
+       echo "  -s   --skip-fetch-tags (default: no)"
+       echo "     skip git fetch --tags when getting autotag"
        echo "  -h   --help"
        echo "     show this help"
        echo ""
        echo "Choose SPECS out of:"
        echo ""
        echo "all - all * (libs, base, other, koffice, l10n)"
-       echo "libs - kdelibs and kdepimlibs kdelibs-experimental"
+       echo "libs - kdelibs and kdepimlibs"
        echo "base - kdebase* oxygen-icons"
        echo "other - all other * except libs and base"
        echo "koffice - koffice"
@@ -38,6 +40,7 @@ ATAG=no
 SENDPRIO=
 BUILDER=
 PRIO=2
+SKIPFETCHTAGS=0
 #SPECDIR=$(rpm -E %_specdir)
 SPECDIR=~/rpm
 
@@ -120,6 +123,10 @@ while [ $# -gt 0 ]; do
                        PRIO=$2
                        shift
                        ;;
+               
+               --skip-fetch-tags | -s )
+                       SKIPFETCHTAGS=1
+                       ;;
 
                --help | -h )
                        usage
@@ -177,7 +184,14 @@ fi
 if [ "$ATAG" == "yes" ]; then
        for spec in $specs; do
                PKG=$(echo $spec |sed -e 's/.spec//g')
-               LAST_AUTOTAG=$(cd $SPECDIR/packages && ksh ./builder -g -ns $PKG/$spec >/dev/null 2>&1 && cvs status -v $PKG/$spec | awk -vdist=$disttag '!/Sticky/ && $1 ~ "^auto-" dist "-"{if (!a++) print $1}')
+               if [ ! -d $PKG ]; then
+                       git clone git@git.tld-linux.org:packages/${PKG}
+               fi
+               if [ $SKIPFETCHTAGS -lt 1 ]; then
+                       LAST_AUTOTAG=$(cd $PKG && git fetch -q --tags && git tag |tail -n 1)
+               else
+                       LAST_AUTOTAG=$(cd $PKG && git tag |tail -n 1)
+               fi
                sleep 1
                SENDPRIO="$SENDPRIO $spec:$LAST_AUTOTAG "
        done