View | Details | Raw Unified | Return to bug 204772 | Differences between
and this patch

Collapse All | Expand All

(-)Mk/bsd.sites.mk (+22 lines)
Lines 519-524 Link Here
519
#                 Using the name of a branch here is incorrect. It is
519
#                 Using the name of a branch here is incorrect. It is
520
#                 possible to do GH_TAGNAME= GIT_HASH to do a snapshot.
520
#                 possible to do GH_TAGNAME= GIT_HASH to do a snapshot.
521
#                 default: ${DISTVERSION}
521
#                 default: ${DISTVERSION}
522
# GH_TUPLE      - above shortened to account:project:tagname[:group]
522
#
523
#
523
.if defined(USE_GITHUB)
524
.if defined(USE_GITHUB)
524
.  if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
525
.  if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
Lines 526-531 Link Here
526
		Must use a tag or commit hash so the upstream does \
527
		Must use a tag or commit hash so the upstream does \
527
		not "reroll" as soon as the branch is updated
528
		not "reroll" as soon as the branch is updated
528
.  endif
529
.  endif
530
.  if defined(GH_TUPLE)
531
GH_ACCOUNT+=	${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1\4@}
532
GH_PROJECT+=	${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\2\4@}
533
GH_TAGNAME+=	${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\3\4@}
534
535
_GIT_REV_GET=	${GH_TUPLE:@TUPLE@GIT_REV_${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\4@:C@:@@:C@-@_@g}=`git ls-remote https://github.com/${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1@}/${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\2@}.git | ${GREP} HEAD | ${SED} -E "s/^(.......).*/\\1/g"` && @}
536
_GIT_REV_ECHO=	${GH_TUPLE:@TUPLE@echo "GH_TUPLE+=	${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1:\2:\${GIT_REV_${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\4@:C@:@@:C@-@_@g}}\4@}" && @}
537
_GIT_REV_CHANGE=${GH_TUPLE:@TUPLE@if [ ${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\3@} != "\$$GIT_REV_${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\4@:C@:@@:C@-@_@g}" ]; then echo "GH_TUPLE+=	${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1:\2:\${GIT_REV_${TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\4@:C@:@@:C@-@_@g}}\4@}"; fi && @}
538
539
gh-get-latest-revisions:
540
	@${ECHO} "--begin latest revisions--" && \
541
		${_GIT_REV_GET} \
542
		${_GIT_REV_ECHO} \
543
	${ECHO} "--end latest revisions--"
544
545
gh-get-changed-revisions:
546
	@${ECHO} "--begin changed revisions--" && \
547
		${_GIT_REV_GET} \
548
		${_GIT_REV_CHANGE} \
549
	${ECHO} "--end changed revisions--"
550
.  endif
529
# We are cheating and using backend URLS for Github here. See ports/194898
551
# We are cheating and using backend URLS for Github here. See ports/194898
530
# comment #15 for explanation as to why and how to deal with it if it breaks.
552
# comment #15 for explanation as to why and how to deal with it if it breaks.
531
MASTER_SITE_GITHUB+=		https://codeload.github.com/%SUBDIR%
553
MASTER_SITE_GITHUB+=		https://codeload.github.com/%SUBDIR%

Return to bug 204772