X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=luci.mk;h=7674825b499b524809286258541ef0ff44add856;hp=69aecaa250578a821665e186244dfa53026fa66f;hb=fb2e4a80c1ac5853cb660e2df7f1deade4d4a05c;hpb=5180a5bb8bcab18e06d25dbe94ba3f5e37e66248 diff --git a/luci.mk b/luci.mk index 69aecaa25..7674825b4 100644 --- a/luci.mk +++ b/luci.mk @@ -56,7 +56,7 @@ PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ elif git log -1 >/dev/null 2>/dev/null; then \ revision="svn-r$$(LC_ALL=C git log -1 | sed -ne 's/.*git-svn-id: .*@\([0-9]\+\) .*/\1/p')"; \ if [ "$$revision" = "svn-r" ]; then \ - set -- $$(git log -1 --format="%ct %h"); \ + set -- $$(git log -1 --format="%ct %h" --abbrev=7); \ secs="$$(($$1 % 86400))"; \ yday="$$(date --utc --date="@$$1" "+%y.%j")"; \ revision="$$(printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2")"; \ @@ -70,7 +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)"; \ + 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 \