summaryrefslogtreecommitdiffhomepage
path: root/luci.mk
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-02-20 14:34:16 +0100
committerJo-Philipp Wich <jo@mein.io>2017-02-20 14:35:54 +0100
commita57a17ad8a0a545c7728f11bff61807f9509fec1 (patch)
treeace68c40d2c42c5c4072d7b5e9b07c2ccf7852c7 /luci.mk
parent79992f1a670aad9306d96d61b8df83d2cd397ed1 (diff)
luci.mk: only use remote branch detection
LEDE's scripts/feeds script creates local branches named after the checked out commit hash, confusing local branch detection. Solely use remote branch detection to avoid misidentifying such cases. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'luci.mk')
-rw-r--r--luci.mk5
1 files changed, 2 insertions, 3 deletions
diff --git a/luci.mk b/luci.mk
index 26f3c94f9..137886f1b 100644
--- a/luci.mk
+++ b/luci.mk
@@ -70,9 +70,8 @@ PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \
PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \
variant="LuCI"; \
if git log -1 >/dev/null 2>/dev/null; then \
- branch="$$(git symbolic-ref --short -q HEAD 2>/dev/null || \
- git branch --remote --verbose --no-abbrev --contains 2>/dev/null | \
- sed -e 's|^.*/||; s| .*||; q')"; \
+ branch="$$(git branch --remote --verbose --no-abbrev --contains 2>/dev/null | \
+ sed -rne 's|^[^/]+/([^ ]+) [a-f0-9]{40} .+$$|\1|p' | head -n1)"; \
if [ "$$branch" != "master" ]; then \
variant="LuCI $$branch branch"; \
else \