mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
deal with 3 digit releases
This commit is contained in:
parent
fc6d8222bf
commit
42fa17a860
2
Makefile
2
Makefile
@ -89,7 +89,7 @@ endif
|
|||||||
ifndef ALT_RELEASE
|
ifndef ALT_RELEASE
|
||||||
# Default release labeling. (This may fail and give inconsistent results due to the fact that
|
# Default release labeling. (This may fail and give inconsistent results due to the fact that
|
||||||
# travis does a shallow clone.)
|
# travis does a shallow clone.)
|
||||||
LATEST_RELEASE=$(shell git tag | grep RELEASE_ | sort | tail -1)
|
LATEST_RELEASE=$(shell git tag | grep RELEASE_ | sort -n -t V -k 2,2 | tail -1)
|
||||||
# use egrep to count lines instead of wc to avoid whitespace error on Mac
|
# use egrep to count lines instead of wc to avoid whitespace error on Mac
|
||||||
COMMITS_SINCE_RELEASE=$(shell git log --oneline $(LATEST_RELEASE)..HEAD | egrep -c .)
|
COMMITS_SINCE_RELEASE=$(shell git log --oneline $(LATEST_RELEASE)..HEAD | egrep -c .)
|
||||||
ifneq ($(COMMITS_SINCE_RELEASE),0)
|
ifneq ($(COMMITS_SINCE_RELEASE),0)
|
||||||
|
|||||||
@ -408,7 +408,7 @@ def get_version():
|
|||||||
alt_release = os.getenv("ALT_RELEASE")
|
alt_release = os.getenv("ALT_RELEASE")
|
||||||
if alt_release == None:
|
if alt_release == None:
|
||||||
# Default release labeling based on commits since last release tag
|
# Default release labeling based on commits since last release tag
|
||||||
latest_release = subprocess.check_output('git tag | grep RELEASE_ | sort | tail -1', shell=True).strip()
|
latest_release = subprocess.check_output('git tag | grep RELEASE_ | sort -n -t V -k 2,2 | tail -1', shell=True).strip()
|
||||||
commits_since_release = subprocess.check_output('git log --oneline '+latest_release.decode("utf-8")+'..HEAD | wc -l', shell=True).decode("utf-8").strip()
|
commits_since_release = subprocess.check_output('git log --oneline '+latest_release.decode("utf-8")+'..HEAD | wc -l', shell=True).decode("utf-8").strip()
|
||||||
else:
|
else:
|
||||||
# Alternate release labeling with fork name (in ALT_RELEASE env var) plus branch
|
# Alternate release labeling with fork name (in ALT_RELEASE env var) plus branch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user