1
0
forked from brl/citadel

Fix no git_owner when building from htts cloned repo

This commit is contained in:
isa 2024-10-01 16:27:57 -04:00
parent 4c6f4f4a3d
commit 4859e374a9

View File

@ -13,7 +13,12 @@ SRCREV = "24f786cf75d093b617511ef568e3f231b52b320d"
# get git repo owner from citadel to find the correct citadel-tools repo path # get git repo owner from citadel to find the correct citadel-tools repo path
python () { python () {
import subprocess import subprocess
git_owner = subprocess.check_output(['git', 'remote', 'get-url', 'origin']).strip().decode('utf-8').split('/')[0].split(':')[1] git_url = subprocess.check_output(['git', 'remote', 'get-url', 'origin']).strip().decode('utf-8')
if git_url.startswith("git"):
git_owner = git_url.split('/')[0].split(':')[1]
else:
git_owner = git_url.split('/')[3]
d.setVar("GIT_REPO_OWNER", git_owner) d.setVar("GIT_REPO_OWNER", git_owner)
} }