osmith submitted this change.
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
---
M scripts/common.sh
M scripts/osmocom-list-commits.sh
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_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 @@
# 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 @@
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"
To view, visit change 29119. To unsubscribe, or for help writing mail filters, visit settings.