-
Notifications
You must be signed in to change notification settings - Fork 212
Expand file tree
/
Copy pathversion.mk
More file actions
27 lines (25 loc) · 937 Bytes
/
Copy pathversion.mk
File metadata and controls
27 lines (25 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Unified version management for modem_feeds
# This file should be included by all Makefiles in the feeds
define qmodem_commitcount
$(shell \
if git log -1 >/dev/null 2>/dev/null; then \
if [ -n "$(1)" ]; then \
last_bump="$$(git log --pretty=format:'%h %s' . | \
grep -m 1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \
cut -f 1 -d ' ')"; \
fi; \
if [ -n "$$last_bump" ]; then \
echo -n $$(($$(git rev-list --count "$$last_bump..HEAD" .) + 1)); \
else \
echo -n $$(git rev-list --count HEAD .); \
fi; \
else \
echo -n 0; \
fi)
endef
QMODEM_COMMITCOUNT = $(if $(DUMP),0,$(call qmodem_commitcount))
QMODEM_AUTORELEASE = $(if $(DUMP),0,$(call qmodem_commitcount,1))
# apk-tools accepts prerelease suffixes in _rcN form. PKG_RELEASE must remain
# numeric because OpenWrt appends it as -rN to the package version.
QMODEM_VERSION:=3.4.0_rc3
QMODEM_RELEASE:=$(QMODEM_AUTORELEASE)