go: Apply package exclusion equally
The exclusion logic was moved out of getGoDirs but only buildPhase was updated causing checkPhase to possibly fail. This happened in golint as it has go files in testdata that are meant as testdata files and not go packages to test which caused the checkPhase to fail. Fixes #167717
This commit is contained in:
parent
6443a5d6da
commit
ddcc7c67d2
|
@ -204,7 +204,7 @@ let
|
|||
if [ -n "$subPackages" ]; then
|
||||
echo "$subPackages" | sed "s,\(^\| \),\1./,g"
|
||||
else
|
||||
find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique
|
||||
find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique | grep -v "$exclude"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,6 @@ let
|
|||
export NIX_BUILD_CORES=1
|
||||
fi
|
||||
for pkg in $(getGoDirs ""); do
|
||||
grep -q "$exclude" <<<$pkg && continue
|
||||
echo "Building subPackage $pkg"
|
||||
buildGoDir install "$pkg"
|
||||
done
|
||||
|
|
|
@ -184,7 +184,7 @@ let
|
|||
echo "$subPackages" | sed "s,\(^\| \),\1$goPackagePath/,g"
|
||||
else
|
||||
pushd "$NIX_BUILD_TOP/go/src" >/dev/null
|
||||
find "$goPackagePath" -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort | uniq
|
||||
find "$goPackagePath" -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort | uniq | grep -v "$exclude"
|
||||
popd >/dev/null
|
||||
fi
|
||||
}
|
||||
|
@ -202,7 +202,6 @@ let
|
|||
export NIX_BUILD_CORES=1
|
||||
fi
|
||||
for pkg in $(getGoDirs ""); do
|
||||
grep -q "$exclude" <<<$pkg && continue
|
||||
echo "Building subPackage $pkg"
|
||||
buildGoDir install "$pkg"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue