forked from FUjr/QModem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.mk
More file actions
25 lines (23 loc) · 787 Bytes
/
version.mk
File metadata and controls
25 lines (23 loc) · 787 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
# 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))
QMODEM_VERSION:=3.0.2
QMODEM_RELEASE:=$(QMODEM_AUTORELEASE)