mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-02 01:20:54 +00:00
Mk/Uses/go.mk: Disable network access in extract and test targets.
Reported by: Andrew Gierth <andrew at tao11.riddles.org.uk>
This commit is contained in:
parent
d07490ca32
commit
3d906ae2a1
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=566324
@ -162,7 +162,7 @@ post-fetch:
|
||||
@${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies";
|
||||
@(cd ${DISTDIR}/${DIST_SUBDIR}; \
|
||||
[ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \
|
||||
${SETENV} ${GO_ENV} ${GO_CMD} mod download -x)
|
||||
${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x)
|
||||
.endif
|
||||
|
||||
.if !target(post-extract)
|
||||
@ -172,7 +172,7 @@ post-extract:
|
||||
@${LN} -sf ${WRKSRC} ${GO_WRKSRC}
|
||||
. elif ${go_ARGS:Mmodules} && defined(GO_MODULE)
|
||||
post-extract:
|
||||
@(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor)
|
||||
@(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} GOPROXY=off ${GO_CMD} mod vendor)
|
||||
. endif
|
||||
.endif
|
||||
|
||||
@ -211,7 +211,7 @@ do-test:
|
||||
(cd ${GO_WRKSRC}; \
|
||||
for t in ${GO_TESTTARGET}; do \
|
||||
${ECHO_MSG} "===> Testing $${t}"; \
|
||||
${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \
|
||||
${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \
|
||||
done)
|
||||
.endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user