diff --git a/scripts/check b/scripts/check index 305fc51..044c6ca 100755 --- a/scripts/check +++ b/scripts/check @@ -21,9 +21,15 @@ private_token="$(jq -r '.source.private_token // ""' < "${payload}")" no_ssl="$(jq -r '.source.no_ssl // ""' < "${payload}")" version_sha="$(jq -r '.version.sha // ""' < "${payload}")" -gitlab_host="$(echo "${uri}" | sed -rn 's/(https?):\/\/([^\/]*)\/(.*)\.git/\2/p')" -project_path="$(echo "${uri}" | sed -rn 's/(https?):\/\/([^\/]*)\/(.*)\.git/\3/p')" -protocol="$(echo "${uri}" | sed -rn 's/(https?):\/\/([^\/]*)\/(.*)\.git/\1/p')" +if [[ "${uri}" == "git@"* ]]; then + gitlab_host="$(echo "${uri}" | sed -rn 's/git@(.*):(.*)\.git/\1/p')" + project_path="$(echo "${uri}" | sed -rn 's/git@(.*):(.*)\.git/\2/p')" + protocol='https' +else + gitlab_host="$(echo "${uri}" | sed -rn 's/(https?):\/\/([^\/]*)\/(.*)\.git/\2/p')" + project_path="$(echo "${uri}" | sed -rn 's/(https?):\/\/([^\/]*)\/(.*)\.git/\3/p')" + protocol="$(echo "${uri}" | sed -rn 's/(https?):\/\/([^\/]*)\/(.*)\.git/\1/p')" +fi if [ "${no_ssl}" == 'true' ]; then protocol='http'