mirror of https://git.wownero.com/dsc/mxe.git
Merge pull request #888 from LuaAndC/get-github-tags
add macro MXE_GET_GITHUB_TAGS
This commit is contained in:
commit
21630887e1
13
Makefile
13
Makefile
|
@ -124,9 +124,16 @@ MAKE_SHARED_FROM_STATIC = \
|
||||||
--bindir '$(PREFIX)/$(TARGET)/bin'
|
--bindir '$(PREFIX)/$(TARGET)/bin'
|
||||||
|
|
||||||
define MXE_GET_GITHUB_SHA
|
define MXE_GET_GITHUB_SHA
|
||||||
$(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/heads/$(strip $(2))' | \
|
$(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/heads/$(strip $(2))' \
|
||||||
$(SED) -n 's#.*"sha": "\([^"]\{10\}\).*#\1#p' | \
|
| $(SED) -n 's#.*"sha": "\([^"]\{10\}\).*#\1#p' \
|
||||||
head -1
|
| 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
|
endef
|
||||||
|
|
||||||
# use a minimal whitelist of safe environment variables
|
# use a minimal whitelist of safe environment variables
|
||||||
|
|
Loading…
Reference in New Issue