mirror of https://github.com/google/oss-fuzz.git
go: compiles projects without go.mod from their directory (#5878)
This commit is contained in:
parent
c6017d9ddc
commit
26b9dd9828
|
@ -29,7 +29,7 @@ cd $GOPATH/src/$path || true
|
|||
# in the case we are in the right directory, with go.mod but no go.sum
|
||||
go mod tidy || true
|
||||
# project was downloaded with go get if go list fails
|
||||
go list $tags $path || { cd $GOPATH/pkg/mod/ && cd `echo $path | cut -d/ -f1-3 | awk '{print $1"@*"}'`; }
|
||||
go list $tags $path || { cd $GOPATH/pkg/mod/ && cd `echo $path | cut -d/ -f1-3 | awk '{print $1"@*"}'`; } || cd -
|
||||
# project does not have go.mod if go list fails again
|
||||
go list $tags $path || { go mod init $path && go mod tidy ;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue