From 381d5d7759dfdb9a713418820a6d92caafaedf7a Mon Sep 17 00:00:00 2001 From: Vasiliy Vasilyuk Date: Sat, 21 Sep 2024 18:35:14 +0300 Subject: [PATCH] 1 --- go-mod-bump.sh | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/go-mod-bump.sh b/go-mod-bump.sh index 534de1a..c172cd8 100755 --- a/go-mod-bump.sh +++ b/go-mod-bump.sh @@ -110,28 +110,4 @@ function update_module() { go build ./... } -function bump_module() { - module=$(echo "$1" | cut -f1 -d@) - current_version=$(echo "$1" | cut -f2 -d@) - latest_version=$(echo "$1" | cut -f3 -d@) - - if ! update_module "${module}@${latest_version}" >/dev/null 2>&1 >/dev/null; then - echoerr "go-mod-bump: failed to update module ${module} from ${current_version} to ${latest_version}" - echoerr "try to update module manually using commands:" - echoerr "go get ${module}@${latest_version}" - echoerr "go mod tidy" - echoerr "go build ./..." - git checkout -f HEAD -- go.mod go.sum - return - fi - - git reset HEAD -- . >/dev/null - git add go.mod go.sum >/dev/null - git commit -a -m "${PREFIX}Bump ${module} from ${current_version} to ${latest_version}" >/dev/null - - echoerr "go-mod-bump: upgraded ${module} ${current_version} => [${latest_version}]" -} - -for mdl in $MODULES_FOR_UPDATE; do - (bump_module "$mdl") -done +echo "DO NOTHING"