Commit bfbdae02 authored by Andreas Tille's avatar Andreas Tille
Browse files

Do not continue if Salsa did not returned any group ID

parent 2ad5c60f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -21,6 +21,11 @@ SALSA_GROUP=`echo $VCSGIT | sed -e 's#.*://salsa.debian.org/\([^/]\+\)/.*#\1#'`

SALSA_GROUP_ID=$(curl -s -f -XGET --header "PRIVATE-TOKEN: $SALSA_TOKEN" "$SALSA_URL/groups/$SALSA_GROUP" | jq '.id')

if [ "$SALSA_GROUP_ID" = "" ] ; then
    echo "Failed to find group ID for $SALSA_GROUP"
    exit 1
fi

set -x
curl "$SALSA_URL/projects?private_token=$SALSA_TOKEN" \
     --data "path=${DEBPKGNAME}&namespace_id=${SALSA_GROUP_ID}&description=${SHORTDESC}&visibility=public"