Skip to content

Commit 91342c9

Browse files
committed
Remove v2 from release script
Signed-off-by: Benjamin Wang <[email protected]>
1 parent 77d3af3 commit 91342c9

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

scripts/release_mod.sh

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ function _cmd() {
2424
log_info " - push_mod_tags - Tags HEAD with all modules versions tags and pushes it to \${REMOTE_REPO}."
2525
}
2626

27-
# update_module_version [v2version] [v3version]
27+
# update_module_version [v3version]
2828
# Updates versions of cross-references in all internal references in current module.
2929
function update_module_version() {
3030
local v3version="${1}"
31-
local v2version="${2}"
3231
local modules
3332
run go mod tidy
3433
modules=$(run go list -f '{{if not .Main}}{{if not .Indirect}}{{.Path}}{{end}}{{end}}' -m all)
@@ -38,11 +37,6 @@ function update_module_version() {
3837
run go mod edit -require "${dep}@${v3version}"
3938
done
4039

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-
4640
run go mod tidy
4741
}
4842

@@ -61,18 +55,13 @@ function update_versions_cmd() {
6155
fi
6256

6357
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')"
6858

6959
log_info "DRY_RUN : ${DRY_RUN}"
7060
log_info "TARGET_VERSION: ${TARGET_VERSION}"
7161
log_info ""
7262
log_info "v3version: ${v3version}"
73-
log_info "v2version: ${v2version}"
7463

75-
run_for_modules update_module_version "${v3version}" "${v2version}"
64+
run_for_modules update_module_version "${v3version}"
7665
run_for_modules mod_tidy_fix || exit 2
7766
}
7867

0 commit comments

Comments
 (0)