mirror of https://github.com/k3s-io/k3s
codecgen from Godeps in scripts
parent
41c32e84ee
commit
119b958cca
|
@ -35,11 +35,11 @@ generated_files=$(
|
|||
|
||||
# Build codecgen binary from Godeps.
|
||||
function cleanup {
|
||||
rm -rf "${KUBE_ROOT}/codecgen_binary"
|
||||
rm -f "${CODECGEN:-}"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
godep go build -o codecgen_binary github.com/ugorji/go/codec/codecgen
|
||||
CODECGEN="${PWD}/codecgen_binary"
|
||||
godep go build -o "${CODECGEN}" github.com/ugorji/go/codec/codecgen
|
||||
|
||||
for generated_file in ${generated_files}; do
|
||||
initial_dir=${PWD}
|
||||
|
|
|
@ -45,15 +45,19 @@ function cleanup {
|
|||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# build codecgen tool
|
||||
# Build codecgen from Godeps.
|
||||
# However, we need to install godep first.
|
||||
# We make some tricks with GOPATH variable to make it work with Travis.
|
||||
_gopath=${GOPATH}
|
||||
export GOPATH="${_tmpdir}"
|
||||
go get -u github.com/ugorji/go/codec/codecgen 2>/dev/null
|
||||
go install github.com/ugorji/go/codec/codecgen 2>/dev/null
|
||||
CODECGEN="${_tmpdir}/bin/codecgen"
|
||||
go get -u github.com/tools/godep 2>/dev/null
|
||||
go install github.com/tools/godep 2>/dev/null
|
||||
GODEP="${_tmpdir}/bin/godep"
|
||||
export GOPATH=${_gopath}
|
||||
|
||||
CODECGEN="${_tmpdir}/codecgen_binary"
|
||||
${GODEP} go build -o "${CODECGEN}" github.com/ugorji/go/codec/codecgen
|
||||
|
||||
for generated_file in ${generated_files}; do
|
||||
initial_dir=${PWD}
|
||||
file=${generated_file//\.generated\.go/.go}
|
||||
|
|
Loading…
Reference in New Issue