Mk/Uses/go.mk: Fix gomod-vendor-diff when there are 3 or fewer items in the GH_TUPLE
'make gomod-vendor-diff' currently doesn't work properly when modules2tuple doesn't return the first empty line, when 3 or fewer items are in the GH_TUPLE list. PR: 245617 Submitted by: yuri
This commit is contained in:
parent
dbe564bf87
commit
30577a1486
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=531678
@ -191,7 +191,7 @@ gomod-vendor: gomod-vendor-deps patch
|
||||
|
||||
gomod-vendor-diff: gomod-vendor-deps patch
|
||||
@cd ${WRKSRC}; ${SETENV} GOPATH=${WRKDIR}/.gopath GOFLAGS=-modcacherw ${GO_CMD} mod vendor; \
|
||||
[ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt | ${GREP} -v "^GH_TUPLE=" | ${SED} 's| \\$$||' > ${WRKDIR}/GH_TUPLE-new.txt && \
|
||||
[ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt | ${SED} 's|GH_TUPLE=| |; s| \\$$||' | ${GREP} -v ' \\' > ${WRKDIR}/GH_TUPLE-new.txt && \
|
||||
echo ${GH_TUPLE} | ${TR} -s " " "\n" | ${SED} "s|^| |" > ${WRKDIR}/GH_TUPLE-old.txt && \
|
||||
${DIFF} ${WRKDIR}/GH_TUPLE-old.txt ${WRKDIR}/GH_TUPLE-new.txt || exit 0
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user