@@ -24,11 +24,10 @@ function _cmd() {
24
24
log_info " - push_mod_tags - Tags HEAD with all modules versions tags and pushes it to \$ {REMOTE_REPO}."
25
25
}
26
26
27
- # update_module_version [v2version] [ v3version]
27
+ # update_module_version [v3version]
28
28
# Updates versions of cross-references in all internal references in current module.
29
29
function update_module_version() {
30
30
local v3version=" ${1} "
31
- local v2version=" ${2} "
32
31
local modules
33
32
run go mod tidy
34
33
modules=$( run go list -f ' {{if not .Main}}{{if not .Indirect}}{{.Path}}{{end}}{{end}}' -m all)
@@ -38,11 +37,6 @@ function update_module_version() {
38
37
run go mod edit -require " ${dep} @${v3version} "
39
38
done
40
39
41
- v2deps=$( echo " ${modules} " | grep -E " ${ROOT_MODULE} /.*/v2" )
42
- for dep in ${v2deps} ; do
43
- run go mod edit -require " ${dep} @${v2version} "
44
- done
45
-
46
40
run go mod tidy
47
41
}
48
42
@@ -61,18 +55,13 @@ function update_versions_cmd() {
61
55
fi
62
56
63
57
local v3version=" ${TARGET_VERSION} "
64
- local v2version
65
- # converts e.g. v3.5.0-alpha.0 --> v2.305.0-alpha.0
66
- # shellcheck disable=SC2001
67
- v2version=" $( echo " ${TARGET_VERSION} " | sed ' s|^v3.\([0-9]*\).|v2.30\1.|g' ) "
68
58
69
59
log_info " DRY_RUN : ${DRY_RUN} "
70
60
log_info " TARGET_VERSION: ${TARGET_VERSION} "
71
61
log_info " "
72
62
log_info " v3version: ${v3version} "
73
- log_info " v2version: ${v2version} "
74
63
75
- run_for_modules update_module_version " ${v3version} " " ${v2version} "
64
+ run_for_modules update_module_version " ${v3version} "
76
65
run_for_modules mod_tidy_fix || exit 2
77
66
}
78
67
0 commit comments