From b52d3c0c9c24e7904908dc50f0c7c6f163556fab Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Wed, 13 Jul 2016 23:04:01 +0300 Subject: refactor macro MXE_GET_GITHUB_ALL_TAGS It is needed to get full list of tags and apply grep or sed manually. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8151794..f86377e 100644 --- a/Makefile +++ b/Makefile @@ -143,9 +143,13 @@ define MXE_GET_GITHUB_SHA | head -1 endef -define MXE_GET_GITHUB_TAGS +define MXE_GET_GITHUB_ALL_TAGS $(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/tags/' \ - | $(SED) -n 's#.*"ref": "refs/tags/\([^"]*\).*#\1#p' \ + | $(SED) -n 's#.*"ref": "refs/tags/\([^"]*\).*#\1#p' +endef + +define MXE_GET_GITHUB_TAGS + $(MXE_GET_GITHUB_ALL_TAGS, $(1)) \ | $(SED) 's,^$(strip $(2)),,g' \ | $(SORT) -V \ | tail -1 -- cgit v0.12