git: b0ea84fccb6d - main - Mk/bsd.sites.mk: Fixup USE_GITHUB code.
Mathieu Arnold
mat at FreeBSD.org
Tue Jun 1 07:29:56 UTC 2021
The branch main has been updated by mat:
URL: https://cgit.FreeBSD.org/ports/commit/?id=b0ea84fccb6dcaa61190fc9052aaad6e5e4f7806
commit b0ea84fccb6dcaa61190fc9052aaad6e5e4f7806
Author: Mathieu Arnold <mat at FreeBSD.org>
AuthorDate: 2021-06-01 07:21:25 +0000
Commit: Mathieu Arnold <mat at FreeBSD.org>
CommitDate: 2021-06-01 07:29:26 +0000
Mk/bsd.sites.mk: Fixup USE_GITHUB code.
This mainly synchronize the subgroups GH_TAGNAME_${_group}_* variables
with their default GH_TAGNAME_* equivalent.
In order to try and avoid this in the future, add a couple of comments
where those two sets of variables are defined.
PR: 256314
Reported by: yuri
---
Mk/bsd.sites.mk | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
index ba3124b51421..c15447a0afe1 100644
--- a/Mk/bsd.sites.mk
+++ b/Mk/bsd.sites.mk
@@ -431,6 +431,8 @@ GH_PROJECT:= ${GH_PROJECT_DEFAULT}
GH_TAGNAME:= ${GH_TAGNAME_DEFAULT}
GH_SUBDIR:= ${GH_SUBDIR_DEFAULT}
. if defined(GH_TAGNAME)
+# If you change either of the _SANITIZED or _EXTRACT variables, please keep the
+# changes in sync with the GH_TAGNAME_${_group}_* variables 50 lines below.
GH_TAGNAME_SANITIZED= ${GH_TAGNAME:S,/,-,g}
# GitHub silently converts tags starting with v to not have v in the filename
# and extraction directory. It also replaces + with -.
@@ -476,8 +478,10 @@ post-extract-gh-DEFAULT:
GH_ACCOUNT_${_group}?= ${GH_ACCOUNT_DEFAULT}
GH_PROJECT_${_group}?= ${GH_PROJECT_DEFAULT}
GH_TAGNAME_${_group}?= ${GH_TAGNAME_DEFAULT}
-GH_TAGNAME_${_group}_SANITIZED= ${GH_TAGNAME_${_group}:S,/,-,}
-GH_TAGNAME_${_group}_EXTRACT= ${GH_TAGNAME_${_group}_SANITIZED:C/^[vV]([0-9])/\1/}
+# If you change either of the _SANITIZED or _EXTRACT variables, please keep the
+# changes in sync with the GH_TAGNAME_* variables 50 lines above.
+GH_TAGNAME_${_group}_SANITIZED= ${GH_TAGNAME_${_group}:S,/,-,g}
+GH_TAGNAME_${_group}_EXTRACT= ${GH_TAGNAME_${_group}_SANITIZED:C/^[vV]([0-9])/\1/:S/+/-/g:C/--*/-/g}
_GH_TUPLE_OUT:= ${_GH_TUPLE_OUT} ${GH_ACCOUNT_${_group}}:${GH_PROJECT_${_group}}:${GH_TAGNAME_${_group}}:${_group}/${GH_SUBDIR_${_group}}
DISTNAME_${_group}:= ${GH_ACCOUNT_${_group}}-${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_SANITIZED}
DISTFILE_${_group}:= ${DISTNAME_${_group}}_GH${_GITHUB_REV}${_GITHUB_EXTRACT_SUFX}
More information about the dev-commits-ports-all
mailing list