aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-08-17 14:35:29 +0200
committerosmith <osmith@sysmocom.de>2022-08-18 08:27:52 +0000
commit43d5155b2eb888ca56ddf0d06f7caa32044bb87d (patch)
tree87a6270cf946dd998aa1c621ddcaebfcce27f4bb
parent7057a9f55d6a5d2f7c2417afaa4e86d973babdf3 (diff)
osmocom-list-commits: use proper git clone urls
Fix the Osmocom-list-commits jenkins job that is currently failing with: fatal: repository 'https://git.osmocom.org/osmo-upf/' not found Change-Id: I2acb9880be57411f11805a2195076b514156aaf3
-rw-r--r--scripts/common.sh8
-rwxr-xr-xscripts/osmocom-list-commits.sh3
2 files changed, 8 insertions, 3 deletions
diff --git a/scripts/common.sh b/scripts/common.sh
index e085123..23a3380 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -52,7 +52,9 @@ OSMO_BRANCH_DOCKER_PLAYGROUND="${OSMO_BRANCH_DOCKER_PLAYGROUND:-master}"
osmo_git_head_commit() {
# git output:
# f90496f577e78944ce8db1aa5b900477c1e479b0 HEAD
- ret="$(git ls-remote "$OSMO_GIT_URL/$1" HEAD)"
+ local url ret
+ url="$(osmo_git_clone_url "$1")"
+ ret="$(git ls-remote "$url" HEAD)"
ret="$(echo "$ret" | awk '{print $1}')"
echo "$ret"
}
@@ -72,7 +74,9 @@ osmo_git_last_commits_tags() {
# ee618ecbedec82dfd240334bc87d0d1c806477b0 refs/tags/debian/0.9.13-0_jrsantos.1
# a3fdd24af099b449c9856422eb099fb45a5595df refs/tags/debian/0.9.13-0_jrsantos.1^{}
# ...
- ret="$(git ls-remote --tags "$OSMO_GIT_URL/$1")"
+ local url ret
+ url="$(osmo_git_clone_url "$1")"
+ ret="$(git ls-remote --tags "$url")"
ret="$(echo "$ret" | grep 'refs/tags/[0-9.]*$' || true)"
ret="$(echo "$ret" | sort -V -t/ -k3)"
if [ "$2" != "all" ]; then
diff --git a/scripts/osmocom-list-commits.sh b/scripts/osmocom-list-commits.sh
index b584195..3fec196 100755
--- a/scripts/osmocom-list-commits.sh
+++ b/scripts/osmocom-list-commits.sh
@@ -15,10 +15,11 @@ for repo in $OSMO_RELEASE_REPOS; do
last_tag="$(osmo_git_last_tags "$repo" 1 "-")"
last_commit="$(osmo_git_last_commits "$repo" 1 "-")"
head_commit="$(osmo_git_head_commit "$repo")"
+ clone_url="$(osmo_git_clone_url "$repo")"
printf "$FORMAT_STR" \
"$repo.git" \
- "$OSMO_GIT_URL/$repo" \
+ "$clone_url" \
"$last_tag" \
"$last_commit" \
"$head_commit"