From 0e7aded18e8700396c2b734098214af2b20c0832 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Tue, 19 Apr 2022 15:18:24 +0100 Subject: [PATCH] Update fuzz dependencies Signed-off-by: Paulo Gomes --- tests/fuzz/oss_fuzz_build.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/fuzz/oss_fuzz_build.sh b/tests/fuzz/oss_fuzz_build.sh index c163b550..6c6dfde0 100755 --- a/tests/fuzz/oss_fuzz_build.sh +++ b/tests/fuzz/oss_fuzz_build.sh @@ -58,14 +58,6 @@ go get -d github.com/AdaLogics/go-fuzz-headers pushd "tests/fuzz" -# Version of the source-controller from which to get the GitRepository CRD. -# Change this if you bump the source-controller/api version in go.mod. -SOURCE_VER=v0.22.2 - -# Version of the image-reflector-controller from which to get the ImagePolicy CRD. -# Change this if you bump the image-reflector-controller/api version in go.mod. -REFLECTOR_VER=v0.17.1 - # Setup files to be embedded into controllers_fuzzer.go's testFiles variable. mkdir -p testdata/crds cp ../../config/crd/bases/*.yaml testdata/crds/ @@ -78,6 +70,14 @@ sed -i 's;module .*;module github.com/fluxcd/image-automation-controller/tests/f sed -i 's;api => ./api;api => ../../api;g' go.mod echo "replace github.com/fluxcd/image-automation-controller => ../../" >> go.mod +# Version of the source-controller from which to get the GitRepository CRD. +# Pulls source-controller/api's version set in go.mod. +SOURCE_VER=$(go list -m github.com/fluxcd/source-controller/api | awk '{print $2}') + +# Version of the image-reflector-controller from which to get the ImagePolicy CRD. +# Pulls image-reflector-controller/api's version set in go.mod. +REFLECTOR_VER=$(go list -m github.com/fluxcd/image-reflector-controller/api | awk '{print $2}') + go mod download if [ -d "../../controllers/testdata/crds" ]; then @@ -90,7 +90,7 @@ else fi go get -d github.com/AdaLogics/go-fuzz-headers -go get github.com/fluxcd/image-automation-controller +go get -d github.com/fluxcd/image-automation-controller # Using compile_go_fuzzer to compile fails when statically linking libgit2 dependencies # via CFLAGS/CXXFLAGS.