server: Update go.mod

This commit is contained in:
Piotr Tabor
2020-10-20 23:07:21 +02:00
parent 4a5e9d1261
commit 6c1efd6ba5
17 changed files with 910 additions and 84 deletions

View File

@@ -105,14 +105,17 @@ function run_for_module {
}
function modules() {
echo "go.etcd.io/etcd/api/v3
go.etcd.io/etcd/pkg/v3
go.etcd.io/etcd/raft/v3
go.etcd.io/etcd/client/v2
go.etcd.io/etcd/client/v3
go.etcd.io/etcd/v3
go.etcd.io/etcd/etcdctl/v3
go.etcd.io/etcd/tests/v3"
modules=(
go.etcd.io/etcd/api/v3
go.etcd.io/etcd/pkg/v3
go.etcd.io/etcd/raft/v3
go.etcd.io/etcd/client/v2
go.etcd.io/etcd/client/v3
go.etcd.io/etcd/server/v3
go.etcd.io/etcd/etcdctl/v3
go.etcd.io/etcd/tests/v3
go.etcd.io/etcd/v3)
echo "${modules[@]}"
}
function modules_exp() {
@@ -132,9 +135,10 @@ function run_for_modules {
run_for_module "raft" "$@" "${pkg}" || return "$?"
run_for_module "client/v2" "$@" "${pkg}" || return "$?"
run_for_module "client/v3" "$@" "${pkg}" || return "$?"
run_for_module "." "$@" "${pkg}" || return "$?"
run_for_module "server" "$@" "${pkg}" || return "$?"
run_for_module "etcdctl" "$@" "${pkg}" || return "$?"
run_for_module "tests" "$@" "${pkg}" || return "$?"
run_for_module "." "$@" "${pkg}" || return "$?"
else
run_for_module "${USERMOD}" "$@" "${pkg}" || return "$?"
fi

View File

@@ -14,9 +14,9 @@ function bom_fixlet {
modules=($(modules_exp))
if GOFLAGS=-mod=mod run_go_tool "github.com/coreos/license-bill-of-materials" \
--override-file ../bill-of-materials.override.json \
"${modules[@]}" > ../bill-of-materials.json.tmp; then
cp ../bill-of-materials.json.tmp ../bill-of-materials.json
--override-file ./bill-of-materials.override.json \
"${modules[@]}" > ./bill-of-materials.json.tmp; then
cp ./bill-of-materials.json.tmp ./bill-of-materials.json
log_success "bom refreshed"
else
log_error "FAIL: bom refreshing failed"
@@ -32,10 +32,10 @@ function bom_fix {
# We regenerate bom from the tests directory, as it's a module
# that depends on all other modules, so we can generate comprehensive content.
# TODO: Migrate to root module, when root module depends on everything (including server & tests).
run_for_module "./tests" bom_fixlet
run_for_module "." bom_fixlet
}
# only build when called directly, not sourced
if [[ "$0" =~ updatebom.sh$ ]]; then
bom_fix
fi
fi