Closed porridge closed 4 years ago
The bug is here:
cd "${CODE_GEN_DIR}" && git reset --hard "${VERSION}" && go mod init && cd -
fi
"${CODE_GEN_DIR}"/generate-groups.sh \
If go.mod
already exists in $CODE_GEN_DIR
, then go mod init
exits 1:
porridge@beczulka:~/Desktop/work/mesosphere/code/kudo/hack/code-gen/8e001e5d1894$ go mod init
go mod init: go.mod already exists
porridge@beczulka:~/Desktop/work/mesosphere/code/kudo/hack/code-gen/8e001e5d1894$ echo $?
1
porridge@beczulka:~/Desktop/work/mesosphere/code/kudo/hack/code-gen/8e001e5d1894$
and therefore cd -
does not executed, and the subsequent command fails since $CODE_GEN_DIR
is relative.
I'm guessing the author (cc @hypnoglow ) was not aware that &&
is tricky:
porridge@beczulka:~/tmp$ cat a.sh
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
false && true
echo still running
porridge@beczulka:~/tmp$ ./a.sh
still running
porridge@beczulka:~/tmp$
After fixing that, the next failure is:
./hack/update_codegen.sh
Using cached code generator version: 8e001e5d1894
Generating deepcopy funcs
hack/code-gen/8e001e5d1894/generate-groups.sh: line 71: GOPATH: unbound variable
Makefile:84: recipe for target 'generate' failed
make: *** [generate] Error 1
This is https://github.com/kubernetes/code-generator/issues/87 and thus unlikely something we can fix here...
What happened:
I ran
make all
as instructed. It failed after a few minutes:What you expected to happen:
Success.
How to reproduce it (as minimally and precisely as possible):
Follow the documented build instructions.