From 43d5155b2eb888ca56ddf0d06f7caa32044bb87d Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 17 Aug 2022 14:35:29 +0200 Subject: [PATCH] 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 --- scripts/common.sh | 8 ++++++-- scripts/osmocom-list-commits.sh | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/common.sh b/scripts/common.sh index e0851233..23a33801 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 b5841950..3fec1961 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"