osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43169?usp=email )
Change subject: deps: avoid redirect with eclipse gitlab ...................................................................... deps: avoid redirect with eclipse gitlab Use ".git" at the end of gitlab URLs to avoid the redirects, e.g.: warning: redirecting to https://gitlab.eclipse.org/eclipse/titan/titan.ProtocolModules.M3UA.git/ This is not just a cosmetic improvement that gets rid of these warnings, but it actually has the effect that we make less requests to the gitlab eclipse server and are less likely to trigger the rate limiting. On my machine I do trigger it with "make deps" without this patch, and with this patch I don't. Change-Id: I4cfb625e0d09e2bbcab2eef89b521f94c9b6c42c --- M deps/update.sh 1 file changed, 13 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/deps/update.sh b/deps/update.sh index 332ce23..64c5b54 100755 --- a/deps/update.sh +++ b/deps/update.sh @@ -3,9 +3,20 @@ COMMIT="$2" URL_PREFIX="$3" +get_full_url() { + case "$URL_PREFIX" in + *gitlab*) + echo "$URL_PREFIX"/"$DIR".git + ;; + *) + echo "$URL_PREFIX"/"$DIR" + ;; + esac +} + update_url() { local current="$(git -C "$DIR" remote get-url origin)" - local full_url="$URL_PREFIX"/"$DIR" + local full_url="$(get_full_url)" if [ "$current" != "$full_url" ]; then echo "[$DIR] Updating URL to $full_url" @@ -18,7 +29,7 @@ update_url else echo "[$DIR] Initial git clone" - git clone -q "$URL_PREFIX"/"$DIR" + git clone -q "$(get_full_url)" fi cd "$DIR" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43169?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I4cfb625e0d09e2bbcab2eef89b521f94c9b6c42c Gerrit-Change-Number: 43169 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: osmith <[email protected]> Gerrit-Reviewer: pespin <[email protected]>
