[PATCH] osmo-ci[master]: scripts: osmo-deps.sh: Allow building against tags

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Mar 30 00:06:28 UTC 2018


Review at  https://gerrit.osmocom.org/7589

scripts: osmo-deps.sh: Allow building against tags

In case we provide a tag, origin/$tag doesn't resolve correctly, we must
use $tag. Same happens probably if we want to build against a specific
commit hash.

Change-Id: Ica50080c8b3e20686fe6f47a2b61718ef4a66d95
---
M scripts/osmo-deps.sh
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/89/7589/1

diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh
index a4afec5..5a7dcc2 100755
--- a/scripts/osmo-deps.sh
+++ b/scripts/osmo-deps.sh
@@ -1,7 +1,12 @@
 #!/bin/sh
 set -ex
 project="$1"
-branch="origin/${2:-master}"
+branch="${2:-master}"
+# If ref is really a branch, we want to track the remote one:
+if [ "x$(git branch -a | grep -c "remotes/origin/$branch\$")" != "x0" ]; then
+        branch="origin/$branch"
+fi
+
 
 if ! test -d "$project";
 then

-- 
To view, visit https://gerrit.osmocom.org/7589
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica50080c8b3e20686fe6f47a2b61718ef4a66d95
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list