Pau Espin Pedrol has submitted this change and it was merged.
Change subject: scripts: osmo-deps.sh: Allow building against tags
......................................................................
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(-)
Approvals:
Pau Espin Pedrol: Verified
Harald Welte: Looks good to me, approved
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: merged
Gerrit-Change-Id: Ica50080c8b3e20686fe6f47a2b61718ef4a66d95
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>