Loading inject-into-salsa-git +11 −9 Original line number Diff line number Diff line Loading @@ -4,8 +4,7 @@ set -e if [ -n "$1" -a "-h" = "$1" -o "--help" = "$1" ] ; then help() { cat <<EOHELP Usage: $(basename $0) Loading @@ -23,9 +22,15 @@ SALSA_TOKEN="YOUR_SALSA_TOKEN" EOSALSATOKEN and this will be found by this script when executed. See https://salsa.debian.org/profile/personal_access_tokens to learn how these can be created. EOHELP } if [ "-h"="$1" -o "--help"="$1" ] ; then help exit fi Loading @@ -34,19 +39,16 @@ set -u SALSARC=~/.ssh/salsarc if [ ! -f $SALSARC ] ; then echo "Missing ${SALSARC}" echo "Just create one containing" echo 'SALSA_URL="https://salsa.debian.org/api/v4"' echo 'SALSA_TOKEN="YOUR_SALSA_TOKEN"' echo "E: Missing ${SALSARC}. Reread help to create that file:" echo echo 'See https://salsa.debian.org/profile/personal_access_tokens to learn more.' help exit 1 fi check_return_code() { if [ $? -ne 0 ]; then echo echo "Something went wrong!" echo "E: Something went wrong!" exit 1 fi } Loading Loading @@ -76,7 +78,7 @@ SALSA_GROUP=`echo $VCSGIT | sed -e 's#.*://salsa.debian.org/\([^/]\+\)/.*#\1#'` #echo $VCSGIT #echo $SALSA_GROUP SALSA_GROUP_ID=$(curl -s -f -XGET --header "PRIVATE-TOKEN: $SALSA_TOKEN" "$SALSA_URL/groups/$SALSA_GROUP?with_projects=false" | jq '.id') SALSA_GROUP_ID=$(curl -s -f -XGET "$SALSA_URL/groups/$SALSA_GROUP?with_projects=false" | jq '.id') if [ "$SALSA_GROUP_ID" = "" ] ; then echo "Failed to find group ID for $SALSA_GROUP" Loading Loading
inject-into-salsa-git +11 −9 Original line number Diff line number Diff line Loading @@ -4,8 +4,7 @@ set -e if [ -n "$1" -a "-h" = "$1" -o "--help" = "$1" ] ; then help() { cat <<EOHELP Usage: $(basename $0) Loading @@ -23,9 +22,15 @@ SALSA_TOKEN="YOUR_SALSA_TOKEN" EOSALSATOKEN and this will be found by this script when executed. See https://salsa.debian.org/profile/personal_access_tokens to learn how these can be created. EOHELP } if [ "-h"="$1" -o "--help"="$1" ] ; then help exit fi Loading @@ -34,19 +39,16 @@ set -u SALSARC=~/.ssh/salsarc if [ ! -f $SALSARC ] ; then echo "Missing ${SALSARC}" echo "Just create one containing" echo 'SALSA_URL="https://salsa.debian.org/api/v4"' echo 'SALSA_TOKEN="YOUR_SALSA_TOKEN"' echo "E: Missing ${SALSARC}. Reread help to create that file:" echo echo 'See https://salsa.debian.org/profile/personal_access_tokens to learn more.' help exit 1 fi check_return_code() { if [ $? -ne 0 ]; then echo echo "Something went wrong!" echo "E: Something went wrong!" exit 1 fi } Loading Loading @@ -76,7 +78,7 @@ SALSA_GROUP=`echo $VCSGIT | sed -e 's#.*://salsa.debian.org/\([^/]\+\)/.*#\1#'` #echo $VCSGIT #echo $SALSA_GROUP SALSA_GROUP_ID=$(curl -s -f -XGET --header "PRIVATE-TOKEN: $SALSA_TOKEN" "$SALSA_URL/groups/$SALSA_GROUP?with_projects=false" | jq '.id') SALSA_GROUP_ID=$(curl -s -f -XGET "$SALSA_URL/groups/$SALSA_GROUP?with_projects=false" | jq '.id') if [ "$SALSA_GROUP_ID" = "" ] ; then echo "Failed to find group ID for $SALSA_GROUP" Loading