summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2015-09-26 07:23:39 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2015-09-26 07:23:59 (GMT)
commit252128a30b2d9a2ddab315409924582ebebd3f47 (patch)
tree3f400bea5ba5b8d5eab01714ed0ee59a60535494 /Makefile
parentb76e14d777fa4d33ed2a970af7688ca910f2973a (diff)
downloadmxe-252128a30b2d9a2ddab315409924582ebebd3f47.zip
mxe-252128a30b2d9a2ddab315409924582ebebd3f47.tar.gz
mxe-252128a30b2d9a2ddab315409924582ebebd3f47.tar.bz2
add macro MXE_GET_GITHUB_TAGS
Source: https://github.com/mxe/mxe/pull/649#issuecomment-143390677
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c289b3f..cfbc52b 100644
--- a/Makefile
+++ b/Makefile
@@ -129,6 +129,13 @@ define MXE_GET_GITHUB_SHA
| head -1
endef
+define MXE_GET_GITHUB_TAGS
+ $(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/tags/' \
+ | $(SED) -n 's#.*"ref": "refs/tags/\([^"]*\).*#\1#p' \
+ | $(SORT) -V \
+ | tail -1
+endef
+
# use a minimal whitelist of safe environment variables
ENV_WHITELIST := PATH LANG MAKE% MXE% %PROXY %proxy LD_LIBRARY_PATH ACLOCAL_PATH
unexport $(filter-out $(ENV_WHITELIST),$(shell env | cut -d '=' -f1))