Skip to content

Commit

Permalink
chore(build): add user prompt for bump-go
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Jan 15, 2025
1 parent 399f8af commit 8674237
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions script/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,11 @@ function run_bump_go_module() {
cversion=v$(git tag -l | grep -i "^$prefix/v[0-9]*" | sed -e "s/^${prefix//\//\\/}\///" | semver sort --filter=latest)
nversion=v$(semver bump "$cmd" "$cversion")

echo "bumping module $prefix: $cversion -> $nversion"

# git tag -a "$prefix/$nversion" -m "$prefix/$nversion"
read -r -p "bumping module $prefix: $cversion -> $nversion? [Y/n]: " response
response=${response,,} # tolower
if [[ $response =~ ^(y| ) ]] || [[ -z $response ]]; then
git tag -a "$prefix/$nversion" -m "$prefix/$nversion"
fi
}

case "$1" in
Expand Down

0 comments on commit 8674237

Please sign in to comment.