]> saetta.ns0.it Git - msys2/commitdiff
Utilizzo di 'branch merged' in debian_tobeupdated, così funziona anche per i pacchett...
authorAndrea Zagli <azagli@libero.it>
Tue, 3 Sep 2019 06:43:34 +0000 (08:43 +0200)
committerAndrea Zagli <azagli@libero.it>
Tue, 3 Sep 2019 06:43:34 +0000 (08:43 +0200)
tools/autobuilder/debian_tobeupdated.sh

index e211c2d9455b1d95f53d67b87994c76f8e4bfdad..90ea02743f6b7532c964625df19639bee2a5e164 100755 (executable)
@@ -25,23 +25,10 @@ git pull
 git checkout $CURRENT_BRANCH
 git stash pop
 
-# not empty if there's at least one commit be merged
-TO_BE_MERGED=`git log --pretty=oneline --graph ..$UPSTREAM_BRANCH | head -n 1 | sed -n -e 's/\* //p'`
-TO_BE_MERGED=${TO_BE_MERGED%% *}
-
-echo "Last commit to be merged: "$TO_BE_MERGED
+TO_BE_MERGED=`git branch --merged | grep $UPSTREAM_BRANCH`
 
 if [ "$TO_BE_MERGED" = "" ]; then
-       echo -e "\nNot to be updated."
+       echo -e "\nThe debian branch must be updated."
 else
-       # the snapshot hash of the package
-       SNAPSHOT_HASH=`head -n 1 debian/changelog | sed -n -e 's/.*\((.*)\).*/\1/;s/.*\(\.gbp\(.*\))\)/\2/p'`
-
-       echo "Debian package snapshot version: "$SNAPSHOT_HASH
-
-       if [ "${TO_BE_MERGED:6}" = "$SNAPSHOT_HASH" ]; then
-               echo -e "\nNot to be updated."
-       else
-               echo -e "\nThe debian branch must be updated."
-       fi
+       echo -e "\nNot to be updated."
 fi