-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,66 @@ | ||
# GOMAJOR | ||
|
||
> A tool for major version upgrades | ||
## Installation | ||
|
||
``` | ||
go install github.com/icholy/gomajor@latest | ||
```sh | ||
$ go install github.com/icholy/gomajor@latest | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
$ gomajor help | ||
## Commands | ||
|
||
GoMajor is a tool for major version upgrades | ||
* `get` - Upgrade to a major version | ||
* `list` - List available updates | ||
* `path` - Modify the module path | ||
* `version` - Print the gomajor version | ||
* `help` - Show this help text | ||
|
||
Usage: | ||
Usage format is as follows: `gomajor <command> [arguments]` | ||
|
||
gomajor <command> [arguments] | ||
## Usage | ||
|
||
The commands are: | ||
#### List Updates | ||
|
||
get upgrade to a major version | ||
list list available updates | ||
path modify the module path | ||
version print the gomajor version | ||
help show this help text | ||
``` | ||
$ gomajor list | ||
``` | ||
|
||
### List Updates | ||
#### Update a module to its latest version | ||
|
||
``` | ||
$ gomajor list | ||
github.com/go-redis/redis: v6.15.9+incompatible [latest v8.1.3] | ||
$ gomajor get github.com/go-redis/redis@latest | ||
``` | ||
|
||
### Update and Rewrite Imports | ||
#### Switch a module to a specific version | ||
|
||
``` | ||
$ gomajor get github.com/go-redis/redis@latest | ||
go get github.com/go-redis/redis/[email protected] | ||
foo.go:4:2 github.com/go-redis/redis/v8 | ||
bar.go:5:2 github.com/go-redis/redis/v8 | ||
$ gomajor get github.com/go-redis/redis@v7 | ||
``` | ||
|
||
**Note:** Use `gomajor get all` to update all modules. | ||
### Update all mobules to their latest version | ||
|
||
``` | ||
$ gomajor get all | ||
``` | ||
|
||
### Increment Module Path Version | ||
#### Increment module path version | ||
|
||
``` | ||
$ gomajor path -next | ||
module github.com/go-redis/redis/v9 | ||
bench_test.go:11:2 github.com/go-redis/redis/v9 | ||
cluster.go:15:2 github.com/go-redis/redis/v9/internal | ||
cluster.go:16:2 github.com/go-redis/redis/v9/internal/hashtag | ||
# etc ... | ||
``` | ||
|
||
### Change Module Path | ||
#### Change module path version | ||
|
||
``` | ||
$ gomajor path goredis.io | ||
module goredis.io | ||
bench_test.go:11:2 goredis.io | ||
cluster.go:15:2 goredis.io/internal | ||
cluster.go:16:2 goredis.io/internal/hashtag | ||
# etc ... | ||
$ gomajor path -version v3 | ||
``` | ||
|
||
### Features: | ||
#### Change module path | ||
|
||
* Finds latest version. | ||
* Rewrites your import paths. | ||
* Lets you ignore SIV on the command line. | ||
* Update your module's major version. | ||
``` | ||
$ gomajor path goredis.io | ||
``` | ||
|
||
### Warning: | ||
|
||
|