oligot / go-mod-upgrade

Update outdated Go dependencies interactively
MIT License
954 stars 45 forks source link

CLI flag to execute a hook for each updated module #14

Closed oligot closed 3 years ago

oligot commented 3 years ago

This is a more general approach to what has been proposed in PR #13, as this allows to run external command for each updated module (not just git commit).

Here is an example hook to commit the changes (saved as .git/hooks/commit.sh):

#!/bin/sh

git add go.mod go.sum
git commit -m "chore(deps): bump $1 from $2 to $3"

hook

oligot commented 3 years ago

Squashed and merged via the git CLI (don't know why it's still open here).

Released in version 0.6.0