mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

We make v2 client code a module go.etcd.io/etcd/client/v2. Pretty mechanical change that can be summarized as: mkdir client/v2 cd client/v2 && git mod init go.etcd.io/etcd/client/v2 git mv client/*.go client/v2/ find -name '*.go' | xargs sed -i --follow-symlinks 's|/v3/client["]|/client/v2\"|g' + fixing changelog, bom, go.mod etc.
20 lines
380 B
Bash
Executable File
20 lines
380 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
source ./scripts/test_lib.sh
|
|
source ./scripts/updatebom.sh
|
|
|
|
function mod_tidy_fix {
|
|
run rm ./go.sum
|
|
run go mod tidy || return 2
|
|
}
|
|
|
|
log_callout -e "\nFixing etcd code for you...\n"
|
|
|
|
run_for_modules run go fmt || exit 2
|
|
run_for_modules mod_tidy_fix || exit 2
|
|
run_for_module tests bom_fix || exit 2
|
|
|
|
log_success -e "\nSUCCESS: etcd code is fixed :)"
|