mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
codecgen from Godeps in scripts
This commit is contained in:
parent
41c32e84ee
commit
119b958cca
@ -35,11 +35,11 @@ generated_files=$(
|
|||||||
|
|
||||||
# Build codecgen binary from Godeps.
|
# Build codecgen binary from Godeps.
|
||||||
function cleanup {
|
function cleanup {
|
||||||
rm -rf "${KUBE_ROOT}/codecgen_binary"
|
rm -f "${CODECGEN:-}"
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
godep go build -o codecgen_binary github.com/ugorji/go/codec/codecgen
|
|
||||||
CODECGEN="${PWD}/codecgen_binary"
|
CODECGEN="${PWD}/codecgen_binary"
|
||||||
|
godep go build -o "${CODECGEN}" github.com/ugorji/go/codec/codecgen
|
||||||
|
|
||||||
for generated_file in ${generated_files}; do
|
for generated_file in ${generated_files}; do
|
||||||
initial_dir=${PWD}
|
initial_dir=${PWD}
|
||||||
|
@ -45,15 +45,19 @@ function cleanup {
|
|||||||
}
|
}
|
||||||
trap cleanup EXIT
|
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.
|
# We make some tricks with GOPATH variable to make it work with Travis.
|
||||||
_gopath=${GOPATH}
|
_gopath=${GOPATH}
|
||||||
export GOPATH="${_tmpdir}"
|
export GOPATH="${_tmpdir}"
|
||||||
go get -u github.com/ugorji/go/codec/codecgen 2>/dev/null
|
go get -u github.com/tools/godep 2>/dev/null
|
||||||
go install github.com/ugorji/go/codec/codecgen 2>/dev/null
|
go install github.com/tools/godep 2>/dev/null
|
||||||
CODECGEN="${_tmpdir}/bin/codecgen"
|
GODEP="${_tmpdir}/bin/godep"
|
||||||
export GOPATH=${_gopath}
|
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
|
for generated_file in ${generated_files}; do
|
||||||
initial_dir=${PWD}
|
initial_dir=${PWD}
|
||||||
file=${generated_file//\.generated\.go/.go}
|
file=${generated_file//\.generated\.go/.go}
|
||||||
|
Loading…
Reference in New Issue
Block a user