GitHub Workflow Status (branch) GoDoc Coverage Status Supported Go Versions GitHub Release Go Report Card
Check and upgrade outdated dependencies in Go modules, with version bumping.
π Smart Package Upgrades: Auto detect and upgrade outdated Go module packages β‘ Multiple Update Strategies: Support direct, indirect, and package updates π§ Go Version Matching: Intelligent analysis prevents toolchain contagion during upgrades π― Version Management Integration: Git tag synchronization to maintain consistent package versions π Source Filtering: Selective updates targeting GitHub/GitLab sources π Workspace Support: Go workspace multi-module batch package management
go install github.com/go-mate/depbump/cmd/depbump@latest
# Basic module update (updates go.mod dependencies) cd project-path && depbump # Update module dependencies across workspace cd project-path && depbump -R # Update module dependencies (same as depbump, explicit) cd project-path && depbump module # Update module dependencies across workspace (same as depbump -R) cd project-path && depbump module -R # Update direct packages (default, -D is optional) cd project-path && depbump update cd project-path && depbump update -D # Update each package (direct + indirect) cd project-path && depbump update -E # Update to latest versions (including prerelease) cd project-path && depbump update -L # Update across workspace modules cd project-path && depbump update -R # Combine flags cd project-path && depbump update -D -R # direct + recursive cd project-path && depbump update -DR # same as above cd project-path && depbump update -E -R # each + recursive cd project-path && depbump update -ER # same as above
# Update GitHub packages depbump update --github-only # Skip GitLab dependencies depbump update --skip-gitlab # Update GitLab packages depbump update --gitlab-only # Skip GitHub dependencies depbump update --skip-github # Combine flags depbump update -E --github-only # Sync dependencies to Git tag versions depbump sync tags # Sync dependencies, use latest when tags missing depbump sync subs
# Smart Go version matching checks and upgrades (default: direct dependencies) # Prevents Go toolchain contagion while upgrading dependencies depbump bump # Upgrade each package (direct + indirect) with Go version matching depbump bump -E # Upgrade to latest versions (including prerelease) depbump bump -L # Upgrade across workspace modules depbump bump -R # Combine flags depbump bump -D -R # direct + recursive depbump bump -DR # same as above depbump bump -E -R # each + recursive depbump bump -ER # same as above # Note: -D and -E are exclusive, -E and -L are exclusive
bump Command Features:
- π§ Go Version Matching: Analyzes each package's Go version requirements
- π« Toolchain Contagion Prevention: Avoids upgrades that would force toolchain changes
- β¬οΈ Upgrade-First Method: Does not downgrade existing packages
- π Intelligent Analysis: Shows version transitions with Go version requirements
- π Workspace Integration: Processes multiple Go modules with ease
- depbump: Default module update (same as
depbump module)-R: Update across workspace modules
- module: Update module dependencies using
go get -u ./...-R: Update across workspace modules
- update: Update dependencies with filtering options
-D: Update direct dependencies (default)-E: Update each package (direct + indirect)-L: Use latest versions (including prerelease)-R: Update across workspace modules--github-only/--skip-github: GitHub filtering--gitlab-only/--skip-gitlab: GitLab filtering- Note:
-Dand-Eare exclusive
- bump: Smart Go version matching upgrades
-D: Upgrade direct dependencies (default)-E: Upgrade each package (direct + indirect)-L: Use latest versions (including prerelease)-R: Upgrade across workspace modules- Note:
-Eand-Lare exclusive
- sync: Git tag synchronization
- tags: Sync to Git tag versions
- subs: Sync with latest fallback
depbump provides intelligent package management that can:
- Auto parse package information from
go.modfiles - Detect available upgrade versions
- Handle version matching issues
- Support Go toolchain version management
Supports Go 1.18+ workspace features:
- Auto detect modules in workspace
- Batch process package updates across multiple modules
- Maintain coherence across workspace packages
- Auto execute
go work sync
Provides Git tag integration features:
- Sync package versions to corresponding Git tags
- Support tag version verification
- Handle missing tag scenarios
# Update module dependencies (default action) depbump # Update module dependencies across workspace depbump -R # Update module dependencies (explicit) depbump module # Update module dependencies across workspace (same as depbump -R) depbump module -R # Update direct dependencies (default) depbump update # Update each package (direct + indirect) depbump update -E # Update to latest versions depbump update -L # Update across workspace depbump update -R # Combine flags depbump update -DR depbump update -ER
# Smart upgrade with Go version matching depbump bump # Upgrade each package depbump bump -E # Upgrade across workspace depbump bump -R # Combine flags depbump bump -DR depbump bump -ER
# Sync dependencies to corresponding Git tag versions depbump sync tags # Sync dependencies with latest fallback depbump sync subs
# GitHub/GitLab specific updates depbump update --github-only # GitHub packages depbump update --skip-github # Skip GitHub dependencies depbump update --gitlab-only # GitLab packages depbump update --skip-gitlab # Skip GitLab dependencies # Combine flags depbump update -E --github-only depbump update -L --skip-gitlab
-
Toolchain Version Mismatch
- depbump manages Go toolchain versions
- Uses project's Go version from go.mod to ensure matching
- Set GOTOOLCHAIN environment variable if needed
-
Package Conflicts
- Run
go mod tidy -efollowing updates to clean up - Use
depbump update -Dinstead ofdepbump update -Eto get safe updates - Check go.mod when encountering incompatible version constraints
- Run
-
Workspace Issues
- Ensure go.work file exists when running workspace commands
- Run
depbump syncto synchronize workspace dependencies - Check that modules are listed in go.work
- Start with direct packages: Use
depbump update(default) to get safe updates - Test updates: Run tests when updating packages
- Use version management: Commit go.mod/go.sum before big updates
- Step-wise updates: Update packages in steps, not at once
- Watch breaking changes: Use
depbump updatebeforedepbump update -L - Use bump command: Use
depbump bumpto prevent Go toolchain contagion
MIT License - see LICENSE.
Contributions are welcome! Report bugs, suggest features, and contribute code:
- π Mistake reports? Open an issue on GitHub with reproduction steps
- π‘ Fresh ideas? Create an issue to discuss
- π Documentation confusing? Report it so we can improve
- π Need new features? Share the use cases to help us understand requirements
- β‘ Performance issue? Help us optimize through reporting slow operations
- π§ Configuration problem? Ask questions about complex setups
- π’ Follow project progress? Watch the repo to get new releases and features
- π Success stories? Share how this package improved the workflow
- π¬ Feedback? We welcome suggestions and comments
New code contributions, follow this process:
- Fork: Fork the repo on GitHub (using the webpage UI).
- Clone: Clone the forked project (
git clone https://github.com/yourname/repo-name.git). - Navigate: Navigate to the cloned project (
cd repo-name) - Branch: Create a feature branch (
git checkout -b feature/xxx). - Code: Implement the changes with comprehensive tests
- Testing: (Golang project) Ensure tests pass (
go test ./...) and follow Go code style conventions - Documentation: Update documentation to support client-facing changes
- Stage: Stage changes (
git add .) - Commit: Commit changes (
git commit -m "Add feature xxx") ensuring backward compatible code - Push: Push to the branch (
git push origin feature/xxx). - PR: Open a merge request on GitHub (on the GitHub webpage) with detailed description.
Please ensure tests pass and include relevant documentation updates.
Welcome to contribute to this project via submitting merge requests and reporting issues.
Project Support:
- β Give GitHub stars if this project helps you
- π€ Share with teammates and (golang) programming friends
- π Write tech blogs about development tools and workflows - we provide content writing support
- π Join the ecosystem - committed to supporting open source and the (golang) development scene
Have Fun Coding with this package! πππ