summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2017-03-19 00:47:53 (GMT)
committerTony Theodore <tonyt@logyst.com>2017-03-19 00:47:53 (GMT)
commita653b25d32c9e012551a5b0b91feb22fe32b1f3e (patch)
tree8a0fc515a3e5c500a5eccd08dd12a1d669d734c6
parent4ed90733c937c8549fc926165781c025c380dec2 (diff)
downloadmxe-a653b25d32c9e012551a5b0b91feb22fe32b1f3e.zip
mxe-a653b25d32c9e012551a5b0b91feb22fe32b1f3e.tar.gz
mxe-a653b25d32c9e012551a5b0b91feb22fe32b1f3e.tar.bz2
github: improve filtering and docs
-rw-r--r--docs/index.html2
-rw-r--r--github.mk7
2 files changed, 4 insertions, 5 deletions
diff --git a/docs/index.html b/docs/index.html
index 5f704d7..293579b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1255,7 +1255,7 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre>
</p>
<p>
To track normal release tags set:
- <pre>$(PKG)_GH_CONF := owner/repo[, tag prefix, tag suffix, tag filter, version separator]</pre>
+ <pre>$(PKG)_GH_CONF := owner/repo[, tag prefix, tag suffix, tag filter-out, version separator]</pre>
To track branches, set:
<pre>$(PKG)_GH_CONF := owner/repo/branch</pre>
See the following packages for examples:
diff --git a/github.mk b/github.mk
index 071b746..cf6edbe 100644
--- a/github.mk
+++ b/github.mk
@@ -40,7 +40,7 @@ GITHUB_SHA_LENGTH := 7
# a version string and bypass `sort -V`
#
# Track tags - Archive API
-# GH_CONF := owner/repo, tag prefix, tag suffix, tag filter, version separator
+# GH_CONF := owner/repo, tag prefix, tag suffix, tag filter-out, version separator
# updates will construct a version number based on:
# <tag prefix><s/<version sep>/./version><tag suffix>
@@ -103,12 +103,11 @@ define MXE_GET_GH_TAGS
| $(SED) -n 's#.*"ref": "refs/tags/\([^"]*\).*#\1#p'
endef
-# called with owner/repo, tag prefix, tag suffix, filter, version sep
+# called with owner/repo, tag prefix, tag suffix, filter-out, version sep
define MXE_GET_GH_TAG
$(MXE_GET_GH_TAGS) \
| $(if $(4),grep -v '$(strip $(4))') \
- | $(SED) 's,^$(strip $(2)),,g' \
- | $(SED) 's,$(strip $(3))$$,,g' \
+ | $(SED) -n 's,^$(strip $(2))\([^"]*\)$(strip $(3))$$,\1,p' \
| tr '$(strip $(5))' '.' \
| $(SORT) -V
| tail -1