aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-09-26 14:38:32 +0200
committerOliver Smith <osmith@sysmocom.de>2022-09-26 14:41:19 +0200
commit3d1bbda3bc535408145268d9a103229e1cdff84b (patch)
tree0b608d7ca18acb5b2db4d125c7ce6a658da7dd02
parentad447c5379b56ce584c44ffaad0742365b6fa999 (diff)
osmo_git_clone_url: git.osmocom.org -> gitea
Update the function to not use legacy URLs anymore and allow adding future gitea URLs more easily. Update the description of the function to reflect the new motivation for using this. Change-Id: Ibf53ca2c444fae82af73e417410faa5b16f5de59
-rw-r--r--scripts/common.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/common.sh b/scripts/common.sh
index 23a3380..6d93cc8 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Various functions and variables used in multiple osmo-ci shell scripts
OSMO_CI_DIR="$(realpath "$(dirname "$0")/..")"
-OSMO_GIT_URL="https://git.osmocom.org"
+OSMO_GIT_URL_GITEA="https://gitea.osmocom.org"
OSMO_GIT_URL_GERRIT="https://gerrit.osmocom.org"
# Osmocom repositories of which we want to build release tarballs automatically, and list the current versions at
@@ -120,13 +120,18 @@ osmo_git_clone_date() {
fi
}
-# Print git clone URL for an Osmocom git repository. Prefer the gerrit clone URL, because cloning from the regular URL
-# sometimes results in the "garbage at end of loose object" error (OS#4083).
+# Echo git clone URL for an Osmocom git repository. For projects developed on
+# gerrit, use the gerrit URL to avoid the mirror sync delay, for other
+# repositories use the gitea URL.
+# https://osmocom.org/projects/cellular-infrastructure/wiki/Git_infrastructure
# $1: Osmocom project (e.g. "osmo-hlr")
osmo_git_clone_url() {
case "$1" in
- rtl-sdr|osmo-fl2k|libosmo-dsp|libgtpnl|libasn1c|libusrp|libsmpp34)
- echo "$OSMO_GIT_URL"/"$1"
+ libgtpnl|libasn1c|libsmpp34)
+ echo "$OSMO_GIT_URL_GITEA"/cellular-infrastructure/"$1"
+ ;;
+ rtl-sdr|osmo-fl2k|libosmo-dsp|libusrp)
+ echo "$OSMO_GIT_URL_GITEA"/sdr/"$1"
;;
*)
echo "$OSMO_GIT_URL_GERRIT"/"$1"