summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-07-13 20:04:01 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2016-07-13 20:04:01 (GMT)
commitb52d3c0c9c24e7904908dc50f0c7c6f163556fab (patch)
tree579bf563056d0088760eb1609be5d293ed720eb2 /Makefile
parenta903d59466a6b7da214a38c68be9a146e5491841 (diff)
downloadmxe-b52d3c0c9c24e7904908dc50f0c7c6f163556fab.zip
mxe-b52d3c0c9c24e7904908dc50f0c7c6f163556fab.tar.gz
mxe-b52d3c0c9c24e7904908dc50f0c7c6f163556fab.tar.bz2
refactor macro MXE_GET_GITHUB_ALL_TAGS
It is needed to get full list of tags and apply grep or sed manually.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files 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