Commit f2096f54 authored by Michael R. Crusoe's avatar Michael R. Crusoe 🏳️‍🌈
Browse files

fix running on new repos

parent 85d1b05d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -37,10 +37,10 @@ if [ "$SALSA_GROUP_ID" = "" ] ; then
fi

# Did we already push to salsa?
set -x
set +e
RESPONSE=$(curl "$SALSA_URL/projects?search=${DEBPKGNAME}")
echo $RESPONSE | jq --exit-status "map(select(.path == \"${DEBPKGNAME}\")) | .[0].id" > /dev/null
set +x
set -e
if [ $? -ne 0 ]; then
    # Seems like not, lets create a project
    set -x
@@ -58,7 +58,9 @@ else
    set +x
fi

set +e
git remote show origin
set -e
if [ $? -ne 0 ] ; then
    git remote add origin git@salsa.debian.org:${SALSA_GROUP}/${DEBPKGNAME}.git
fi