sdk: restrict base feed repo to public git for CONFIG_BUILDBOT only
authorRafał Miłecki <rafal@milecki.pl>
Mon, 4 Dec 2017 11:48:30 +0000 (12:48 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 5 Dec 2017 21:56:31 +0000 (22:56 +0100)
This allows people to build SDK from custom repository (git access using
ssh) and keep original URL in SDK's feeds.conf.default.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Jo-Philipp Wich <jo@mein.io>
target/sdk/Makefile

index ae65fd1c8f4a43ee9201d583150e2aa9d9a4e4ce..bf8c3ca2c66cba4c680a3d42603423b4de472d7a 100644 (file)
@@ -36,7 +36,8 @@ SDK_DIRS = \
                $(STAGING_SUBDIR_HOST) \
                $(STAGING_SUBDIR_TOOLCHAIN)
 
-GIT_URL:=$(filter git://% http://% https://%,$(shell git config --get remote.origin.url 2>/dev/null))
+GIT_URL:=$(shell git config --get remote.origin.url 2>/dev/null)
+GIT_URL:=$(if $(CONFIG_BUILDBOT),$(filter git://% http://% https://%,$(GIT_URL)),$(GIT_URL))
 GIT_COMMIT:=$(shell git rev-parse HEAD 2>/dev/null)
 GIT_BRANCH:=$(filter-out master HEAD,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null))
 GIT_TAGNAME:=$(shell git show-ref --tags --dereference 2>/dev/null | sed -ne '/^$(GIT_COMMIT) / { s|^.*/||; s|\^.*||; p }')