mirror of
https://github.com/openwrt/luci
synced 2025-01-08 12:08:04 +08:00
build: luci.mk: drop support for non-Git SCMs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
c099344013
commit
59fe4086f3
18
luci.mk
18
luci.mk
@ -60,20 +60,10 @@ LUCI_LC_ALIAS.zh_Hant=zh-tw
|
||||
PKG_NAME?=$(LUCI_NAME)
|
||||
|
||||
PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \
|
||||
if svn info >/dev/null 2>/dev/null; then \
|
||||
revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \
|
||||
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" --abbrev=7); \
|
||||
secs="$$(($$1 % 86400))"; \
|
||||
yday="$$(date --utc --date="@$$1" "+%y.%j")"; \
|
||||
revision="$$(printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2")"; \
|
||||
fi; \
|
||||
else \
|
||||
revision="unknown"; \
|
||||
fi; \
|
||||
echo "$$revision" \
|
||||
set -- $$(git log -1 --format="%ct %h" --abbrev=7); \
|
||||
secs="$$(($$1 % 86400))"; \
|
||||
yday="$$(date --utc --date="@$$1" "+%y.%j")"; \
|
||||
printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2" \
|
||||
)))
|
||||
|
||||
PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \
|
||||
|
Loading…
Reference in New Issue
Block a user