From d1298ff8e599d7b5222d54c90d742c67b57886f0 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Wed, 31 Oct 2018 23:34:11 +0100 Subject: [PATCH] [feat] Smaller version on annotated tag (#4295) --- Makefile | 7 +++++-- kodev | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6159a1834..39e961b8b 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,12 @@ KOR_BASE?=base # able to fail: -include $(KOR_BASE)/Makefile.defs -# we want VERSION to carry the version of koreader, not koreader-base +# We want VERSION to carry the version of the KOReader main repo, not that of koreader-base VERSION:=$(shell git describe HEAD) -VERSION:=$(VERSION)_$(shell git describe HEAD | xargs git show -s --format=format:"%cd" --date=short) +# Only append date if we're not on a whole version, like v2018.11 +ifneq (,$(findstring -,$(VERSION))) + VERSION:=$(VERSION)_$(shell git describe HEAD | xargs git show -s --format=format:"%cd" --date=short) +endif # set PATH to find CC in managed toolchains ifeq ($(TARGET), android) diff --git a/kodev b/kodev index 0739f964e..620b4cbfd 100755 --- a/kodev +++ b/kodev @@ -2,7 +2,10 @@ CURDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" VERSION=$(git describe HEAD) -VERSION=${VERSION}_$(git describe HEAD | xargs git show -s --format=format:"%cd" --date=short) +# Only append date if we're not on a whole version, like v2018.11 +if $VERSION | grep -; then + VERSION=${VERSION}_$(git describe HEAD | xargs git show -s --format=format:"%cd" --date=short) +fi # Default Android build to arm. ANDROID_ARCH="${ANDROID_ARCH:-arm}"