aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-07-08 10:19:51 +0200
committerOliver Smith <osmith@sysmocom.de>2022-07-08 14:44:43 +0200
commit6135bf1bc4328ab430e8f798672e3cfb4437e973 (patch)
tree2f489948edd3283ac02ecc3a0a40915a30f0d848
parent6116c0dfe2b5bbae2172c389d087783eb9b52d68 (diff)
scripts/OBS latest: fix checkout with dir in path
osmo-python-tests was added to latest just like it was in nightly, by adding the following two lines to build_osmocom(): checkout python/osmo-python-tests ... build osmo-python-tests But the build fails, because the "checkout" function clones into a "python/osmo-python-tests" directory in latest, and not into a "osmo-python-tests" directory like in nightly. Make it behave the same by adjusting the "checkout" function in nightly. (This code has historically grown and should be refactored imho, but let's fix this bug first.) Fix for: ====> Building osmo-python-tests + cd /home/osmocom-build/jenkins/workspace/Osmocom_OBS_latest_obs.osmocom.org/osmo-python-tests ./scripts/osmocom-latest-packages.sh: 99: cd: can't cd to .../osmo-python-tests Change-Id: I97074ee953cadac476fe2e4b686689c26bac1ea1
-rwxr-xr-xscripts/osmocom-latest-packages.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index 3efc101..9055f5c 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -51,7 +51,8 @@ get_last_tag() {
}
checkout() {
- project=$1
+ path=$1
+ project="$(basename $path)"
url=$2
gitbpargs=""
@@ -60,7 +61,7 @@ checkout() {
fi
if [ -z "$url" ]; then
- url="$(osmo_git_clone_url "$project")"
+ url="$(osmo_git_clone_url "$path")"
fi
echo