mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
server: Update go.mod
This commit is contained in:
47
test
47
test
@@ -485,35 +485,32 @@ function gofmt_pass {
|
||||
function bom_pass {
|
||||
log_callout "Checking bill of materials..."
|
||||
# https://github.com/golang/go/commit/7c388cc89c76bc7167287fb488afcaf5a4aa12bf
|
||||
(
|
||||
cd tests
|
||||
# shellcheck disable=SC2207
|
||||
modules=($(modules_exp))
|
||||
# shellcheck disable=SC2207
|
||||
modules=($(modules_exp))
|
||||
|
||||
# Internally license-bill-of-materials tends to modify go.sum
|
||||
run cp go.sum go.sum.tmp || return 2
|
||||
run cp go.mod go.mod.tmp || return 2
|
||||
# Internally license-bill-of-materials tends to modify go.sum
|
||||
run cp go.sum go.sum.tmp || return 2
|
||||
run cp go.mod go.mod.tmp || return 2
|
||||
|
||||
output=$(GOFLAGS=-mod=mod run_go_tool github.com/coreos/license-bill-of-materials \
|
||||
--override-file ../bill-of-materials.override.json \
|
||||
"${modules[@]}")
|
||||
code="$?"
|
||||
output=$(GOFLAGS=-mod=mod run_go_tool github.com/coreos/license-bill-of-materials \
|
||||
--override-file ./bill-of-materials.override.json \
|
||||
"${modules[@]}")
|
||||
code="$?"
|
||||
|
||||
run cp go.sum.tmp go.sum || return 2
|
||||
run cp go.mod.tmp go.mod || return 2
|
||||
run cp go.sum.tmp go.sum || return 2
|
||||
run cp go.mod.tmp go.mod || return 2
|
||||
|
||||
if [ "${code}" -ne 0 ] ; then
|
||||
log_error -e "license-bill-of-materials (code: ${code}) failed with:\n${output}"
|
||||
return 255
|
||||
else
|
||||
echo "${output}" > "bom-now.json.tmp"
|
||||
fi
|
||||
if ! diff ../bill-of-materials.json bom-now.json.tmp; then
|
||||
log_error "modularized licenses do not match given bill of materials"
|
||||
return 255
|
||||
fi
|
||||
rm bom-now.json.tmp
|
||||
)
|
||||
if [ "${code}" -ne 0 ] ; then
|
||||
log_error -e "license-bill-of-materials (code: ${code}) failed with:\n${output}"
|
||||
return 255
|
||||
else
|
||||
echo "${output}" > "bom-now.json.tmp"
|
||||
fi
|
||||
if ! diff ./bill-of-materials.json bom-now.json.tmp; then
|
||||
log_error "modularized licenses do not match given bill of materials"
|
||||
return 255
|
||||
fi
|
||||
rm bom-now.json.tmp
|
||||
}
|
||||
|
||||
######## VARIOUS CHECKERS ######################################################
|
||||
|
||||
Reference in New Issue
Block a user