mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-22 08:20:39 +00:00
refactor: update urfave/cli version
This commit is contained in:
parent
afa57122ba
commit
3d51776e9a
@ -7,7 +7,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Masterminds/semver"
|
"github.com/Masterminds/semver"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
func currentVersionHandler(git sv.Git) func(c *cli.Context) error {
|
func currentVersionHandler(git sv.Git) func(c *cli.Context) error {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"sv4git/sv"
|
"sv4git/sv"
|
||||||
|
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version for git-sv
|
// Version for git-sv
|
||||||
@ -22,7 +22,7 @@ func main() {
|
|||||||
app.Name = "sv"
|
app.Name = "sv"
|
||||||
app.Version = Version
|
app.Version = Version
|
||||||
app.Usage = "semantic version for git"
|
app.Usage = "semantic version for git"
|
||||||
app.Commands = []cli.Command{
|
app.Commands = []*cli.Command{
|
||||||
{
|
{
|
||||||
Name: "current-version",
|
Name: "current-version",
|
||||||
Aliases: []string{"cv"},
|
Aliases: []string{"cv"},
|
||||||
@ -40,14 +40,14 @@ func main() {
|
|||||||
Aliases: []string{"cl"},
|
Aliases: []string{"cl"},
|
||||||
Usage: "list all commit logs since last version as jsons",
|
Usage: "list all commit logs since last version as jsons",
|
||||||
Action: commitLogHandler(git, semverProcessor),
|
Action: commitLogHandler(git, semverProcessor),
|
||||||
Flags: []cli.Flag{cli.StringFlag{Name: "t", Usage: "get commit log from tag"}},
|
Flags: []cli.Flag{&cli.StringFlag{Name: "t", Usage: "get commit log from tag"}},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "release-notes",
|
Name: "release-notes",
|
||||||
Aliases: []string{"rn"},
|
Aliases: []string{"rn"},
|
||||||
Usage: "generate release notes",
|
Usage: "generate release notes",
|
||||||
Action: releaseNotesHandler(git, semverProcessor, releasenotesProcessor),
|
Action: releaseNotesHandler(git, semverProcessor, releasenotesProcessor),
|
||||||
Flags: []cli.Flag{cli.StringFlag{Name: "t", Usage: "get release note from tag"}},
|
Flags: []cli.Flag{&cli.StringFlag{Name: "t", Usage: "get release note from tag"}},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "tag",
|
Name: "tag",
|
||||||
|
2
go.mod
2
go.mod
@ -6,5 +6,5 @@ require (
|
|||||||
github.com/Masterminds/semver v1.5.0
|
github.com/Masterminds/semver v1.5.0
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
|
||||||
github.com/kelseyhightower/envconfig v1.4.0
|
github.com/kelseyhightower/envconfig v1.4.0
|
||||||
github.com/urfave/cli v1.22.1
|
github.com/urfave/cli/v2 v2.1.1
|
||||||
)
|
)
|
||||||
|
4
go.sum
4
go.sum
@ -13,7 +13,7 @@ github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0
|
|||||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||||
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
|
github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k=
|
||||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
Loading…
Reference in New Issue
Block a user