Commit 16831c18 authored by Mehdi Dogguy's avatar Mehdi Dogguy

Fix import.sh

parent 23fab732
......@@ -13,7 +13,7 @@ fi
OLD_REPO_URL="$1"
SALSA_GROUP="$2"
REPO_NAME="${ALIOTH_URL##*/}"
REPO_NAME="${OLD_REPO_URL##*/}"
PROJECT="${REPO_NAME%.git}"
DESCRIPTION="$PROJECT packaging"
......@@ -21,3 +21,10 @@ SALSA_GROUP_ID=$(curl -f -XGET --header "PRIVATE-TOKEN: $SALSA_TOKEN" $SALSA_URL
curl "$SALSA_URL/v4/projects?private_token=$SALSA_TOKEN" \
--data "path=$PROJECT&namespace_id=$SALSA_GROUP_ID&description=$DESCRIPTION&import_url=$OLD_REPO_URL&visibility=public"
if [ $? -ne 0 ]; then
echo
echo "Something went wrong!"
else
echo
echo "You may now browse your project on: ${SALSA_URL%/api}/$SALSA_GROUP/$PROJECT"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment