Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update the readme #15

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ GoBump is a simple command-line tool written in Go that allows you to update the
## Usage

```shell
gobump -packages=<package@version>,... -modroot=<path to go mod>
gobump --packages=<package@version>,... --modroot=<path to go.mod>
```

**NOTE**: This tool does not run `go mod tidy` at the end, you must run that yourself.

### Flags

* `-packages`: A comma-separated list of packages to update. Each package should be in the format `package@version`.
* `-modroot`: Path to the go.mod root. If not specified, it defaults to the current directory.
* `-replaces`: A comma-separated list of packages to replace. Each entry should be in the format `old=new@version`.

* `--packages`: A comma-separated list of packages to update. Each package should be in the format `package@version`.
* `--modroot`: Path to the go.mod root. If not specified, it defaults to the current directory.
* `--replaces`: A comma-separated list of packages to replace. Each entry should be in the format `old=new@version`.
* `--go-version`: set the go-version for 'go mod tidy' command.
* `--show-diff`: Show the difference between the original and 'go.mod' files.
* `--tidy`: Run 'go mod tidy' command.

## Example

```shell
gobump -packages=github.com/pkg/[email protected],golang.org/x/[email protected] -modroot=/path/to/your/project
gobump --packages=github.com/pkg/[email protected],golang.org/x/[email protected] --modroot=/path/to/your/project
```

This will update the versions of `github.com/pkg/errors` and `golang.org/x/mod` in your `go.mod` file.
Expand Down
Loading