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>
This commit is contained in:
parent
79992f1a67
commit
a57a17ad8a
1 changed files with 2 additions and 3 deletions
5
luci.mk
5
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 \
|
||||
|
|
Loading…
Reference in a new issue