summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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