Skip to content

Commit

Permalink
Rename tool
Browse files Browse the repository at this point in the history
  • Loading branch information
chainchad committed Nov 25, 2024
1 parent b40b4f6 commit 6c6c8be
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# gomod-required-updater
# gomod-local-update

Updates required module versions in go.mod files to match the latest git SHA from a remote branch.

Expand All @@ -21,7 +21,7 @@ Optional:
The installed binary will be placed in your `$GOPATH/bin` directory. Make sure this directory is in your system's PATH to run the command from anywhere. From the root of this repository, run:

```shell
go install ./tools/gomod-required-updater/cmd/gomod-required-updater
go install ./tools/gomod-local-update/cmd/gomod-local-update
```

## Usage Examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ import (
"log"
"os"

"github.com/smartcontractkit/chainlink/v2/tools/gomod-required-updater/internal/updater"
"github.com/smartcontractkit/chainlink/v2/tools/gomod-local-update/internal/updater"
)

const (
goBinaryName = "gomod-local-update"
)
var version = "dev"
var usage = `gomod-required-updater version %s
var usage = fmt.Sprintf(`%s version %%s
Usage:
cd /path/to/go/module
gomod-required-updater [flags]
`
%s [flags]
`, goBinaryName, goBinaryName)

func main() {
cfg, err := updater.ParseFlags(os.Args[1:], version)
Expand All @@ -24,7 +27,7 @@ func main() {
}

if cfg.ShowVersion {
fmt.Printf("gomod-required-updater version %s\n", version)
fmt.Printf("%s version %s\n", goBinaryName, version)
os.Exit(0)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Config struct {
}

func ParseFlags(args []string, version string) (*Config, error) {
flags := flag.NewFlagSet("gomod-required-updater", flag.ContinueOnError)
flags := flag.NewFlagSet("default", flag.ContinueOnError)

cfg := &Config{
ModulesToUpdate: make([]string, 0),
Expand Down

0 comments on commit 6c6c8be

Please sign in to comment.