0
0
mirror of https://github.com/thegeeklab/wp-plugin-go.git synced 2024-11-22 00:20:38 +00:00

chore: upgrade urfave/cli to v2 version

This commit is contained in:
Bo-Yi Wu 2019-11-23 11:56:16 +08:00
parent a8475a3999
commit d1409d8531
5 changed files with 267 additions and 247 deletions

4
go.mod
View File

@ -3,6 +3,6 @@ module github.com/drone-plugins/drone-plugin-lib
go 1.12 go 1.12
require ( require (
github.com/sirupsen/logrus v1.4.2 // indirect github.com/sirupsen/logrus v1.4.2
github.com/urfave/cli v1.21.0 github.com/urfave/cli/v2 v2.0.0
) )

14
go.sum
View File

@ -1,14 +1,24 @@
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
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/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/urfave/cli v1.21.0 h1:wYSSj06510qPIzGSua9ZqsncMmWE3Zr55KBERygyrxE= github.com/urfave/cli/v2 v2.0.0 h1:+HU9SCbu8GnEUFtIBfuUNXN39ofWViIEJIp6SURMpCg=
github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
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=

View File

@ -7,17 +7,17 @@ package urfave
import ( import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/urfave/cli" "github.com/urfave/cli/v2"
) )
const logLevelFlag = "log-level" const logLevelFlag = "log-level"
func loggingFlags() []cli.Flag { func loggingFlags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.StringFlag{ &cli.StringFlag{
Name: logLevelFlag, Name: logLevelFlag,
Usage: "logging-level", Usage: "logging-level",
EnvVar: "PLUGIN_LOG_LEVEL", EnvVars: []string{"PLUGIN_LOG_LEVEL"},
}, },
} }
} }

View File

@ -13,7 +13,7 @@ import (
"time" "time"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/urfave/cli" "github.com/urfave/cli/v2"
) )
//--------------------------------------------------------------------- //---------------------------------------------------------------------
@ -37,10 +37,10 @@ const networkSkipVerifyFlag = "transport.skip-verify"
// networkFlags has the cli.Flags for the Transport. // networkFlags has the cli.Flags for the Transport.
func networkFlags() []cli.Flag { func networkFlags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.BoolFlag{ &cli.BoolFlag{
Name: networkSkipVerifyFlag, Name: networkSkipVerifyFlag,
Usage: "skip ssl verify", Usage: "skip ssl verify",
EnvVar: "PLUGIN_SKIP_VERIFY", EnvVars: []string{"PLUGIN_SKIP_VERIFY"},
}, },
} }
} }

View File

@ -37,7 +37,7 @@ package urfave
import ( import (
"time" "time"
"github.com/urfave/cli" "github.com/urfave/cli/v2"
"github.com/drone-plugins/drone-plugin-lib/internal/environ" "github.com/drone-plugins/drone-plugin-lib/internal/environ"
"github.com/drone-plugins/drone-plugin-lib/pkg/plugin" "github.com/drone-plugins/drone-plugin-lib/pkg/plugin"
@ -113,80 +113,80 @@ const (
// buildFlags has the cli.Flags for the plugin.Build. // buildFlags has the cli.Flags for the plugin.Build.
func buildFlags() []cli.Flag { func buildFlags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.StringFlag{ &cli.StringFlag{
Name: buildActionFlag, Name: buildActionFlag,
Usage: "build action", Usage: "build action",
EnvVar: environ.BuildActionEnvVar, EnvVars: []string{environ.BuildActionEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildCreatedFlag, Name: buildCreatedFlag,
Usage: "build created", Usage: "build created",
EnvVar: environ.BuildCreatedEnvVar, EnvVars: []string{environ.BuildCreatedEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildDeployToFlag, Name: buildDeployToFlag,
Usage: "build deploy to", Usage: "build deploy to",
EnvVar: environ.BuildDeployToEnvVar, EnvVars: []string{environ.BuildDeployToEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildEventFlag, Name: buildEventFlag,
Usage: "build event", Usage: "build event",
EnvVar: environ.BuildEventEnvVar, EnvVars: []string{environ.BuildEventEnvVar},
}, },
cli.StringSliceFlag{ &cli.StringSliceFlag{
Name: buildFailedStagesFlag, Name: buildFailedStagesFlag,
Usage: "build failed stages", Usage: "build failed stages",
EnvVar: environ.BuildFailedStagesEnvVar, EnvVars: []string{environ.BuildFailedStagesEnvVar},
}, },
cli.StringSliceFlag{ &cli.StringSliceFlag{
Name: buildFailedStepsFlag, Name: buildFailedStepsFlag,
Usage: "build failed steps", Usage: "build failed steps",
EnvVar: environ.BuildFailedStepsEnvVar, EnvVars: []string{environ.BuildFailedStepsEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildFinishedFlag, Name: buildFinishedFlag,
Usage: "build finished", Usage: "build finished",
EnvVar: environ.BuildFinishedEnvVar, EnvVars: []string{environ.BuildFinishedEnvVar},
}, },
cli.IntFlag{ &cli.IntFlag{
Name: buildNumberFlag, Name: buildNumberFlag,
Usage: "build number", Usage: "build number",
EnvVar: environ.BuildNumberEnvVar, EnvVars: []string{environ.BuildNumberEnvVar},
}, },
cli.IntFlag{ &cli.IntFlag{
Name: buildParentFlag, Name: buildParentFlag,
Usage: "build parent", Usage: "build parent",
EnvVar: environ.BuildParentEnvVar, EnvVars: []string{environ.BuildParentEnvVar},
}, },
cli.IntFlag{ &cli.IntFlag{
Name: buildPullRequestFlag, Name: buildPullRequestFlag,
Usage: "build pull request", Usage: "build pull request",
EnvVar: environ.BuildPullRequestEnvVar, EnvVars: []string{environ.BuildPullRequestEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildSourceBranchFlag, Name: buildSourceBranchFlag,
Usage: "build source branch", Usage: "build source branch",
EnvVar: environ.BuildSourceBranchEnvVar, EnvVars: []string{environ.BuildSourceBranchEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildStartedFlag, Name: buildStartedFlag,
Usage: "build started", Usage: "build started",
EnvVar: environ.BuildStartedEnvVar, EnvVars: []string{environ.BuildStartedEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildStatusFlag, Name: buildStatusFlag,
Usage: "build status", Usage: "build status",
EnvVar: environ.BuildStatusEnvVar, EnvVars: []string{environ.BuildStatusEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildTagFlag, Name: buildTagFlag,
Usage: "build tag", Usage: "build tag",
EnvVar: environ.BuildTagEnvVar, EnvVars: []string{environ.BuildTagEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: buildTargetBranchFlag, Name: buildTargetBranchFlag,
Usage: "build target branch", Usage: "build target branch",
EnvVar: environ.BuildTargetBranchEnvVar, EnvVars: []string{environ.BuildTargetBranchEnvVar},
}, },
} }
} }
@ -231,50 +231,50 @@ const (
// repoFlags has the cli.Flags for the plugin.Repo // repoFlags has the cli.Flags for the plugin.Repo
func repoFlags() []cli.Flag { func repoFlags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.StringFlag{ &cli.StringFlag{
Name: repoDefaultBranchFlag, Name: repoDefaultBranchFlag,
Usage: "repo default branch", Usage: "repo default branch",
EnvVar: environ.RepoDefaultBranchEnvVar, EnvVars: []string{environ.RepoDefaultBranchEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: repoFullNameFlag, Name: repoFullNameFlag,
Usage: "repo full name", Usage: "repo full name",
EnvVar: environ.RepoFullNameEnvVar, EnvVars: []string{environ.RepoFullNameEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: repoLinkFlag, Name: repoLinkFlag,
Usage: "repo link", Usage: "repo link",
EnvVar: environ.RepoLinkEnvVar, EnvVars: []string{environ.RepoLinkEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: repoNameFlag, Name: repoNameFlag,
Usage: "repo name", Usage: "repo name",
EnvVar: environ.RepoNameEnvVar, EnvVars: []string{environ.RepoNameEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: repoOwnerFlag, Name: repoOwnerFlag,
Usage: "repo owner", Usage: "repo owner",
EnvVar: environ.RepoOwnerEnvVar, EnvVars: []string{environ.RepoOwnerEnvVar},
}, },
cli.BoolFlag{ &cli.BoolFlag{
Name: repoPrivateFlag, Name: repoPrivateFlag,
Usage: "repo private", Usage: "repo private",
EnvVar: environ.RepoPrivateEnvVar, EnvVars: []string{environ.RepoPrivateEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: repoRemoteURLFlag, Name: repoRemoteURLFlag,
Usage: "repo remote url", Usage: "repo remote url",
EnvVar: environ.RepoRemoteURLEnvVar, EnvVars: []string{environ.RepoRemoteURLEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: repoSCMFlag, Name: repoSCMFlag,
Usage: "repo scm", Usage: "repo scm",
EnvVar: environ.RepoSCMEnvVar, EnvVars: []string{environ.RepoSCMEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: repoVisibilityFlag, Name: repoVisibilityFlag,
Usage: "repo visibility", Usage: "repo visibility",
EnvVar: environ.RepoVisibilityEnvVar, EnvVars: []string{environ.RepoVisibilityEnvVar},
}, },
} }
} }
@ -315,60 +315,60 @@ const (
// commitFlags has the cli.Flags for the plugin.Commit. // commitFlags has the cli.Flags for the plugin.Commit.
func commitFlags() []cli.Flag { func commitFlags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.StringFlag{ &cli.StringFlag{
Name: commitAfterFlag, Name: commitAfterFlag,
Usage: "commit after", Usage: "commit after",
EnvVar: environ.CommitAfterEnvVar, EnvVars: []string{environ.CommitAfterEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitAuthorFlag, Name: commitAuthorFlag,
Usage: "commit author", Usage: "commit author",
EnvVar: environ.CommitAuthorEnvVar, EnvVars: []string{environ.CommitAuthorEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitAuthorAvatarFlag, Name: commitAuthorAvatarFlag,
Usage: "commit author avatar", Usage: "commit author avatar",
EnvVar: environ.CommitAuthorAvatarEnvVar, EnvVars: []string{environ.CommitAuthorAvatarEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitAuthorEmailFlag, Name: commitAuthorEmailFlag,
Usage: "commit author email", Usage: "commit author email",
EnvVar: environ.CommitAuthorEmailEnvVar, EnvVars: []string{environ.CommitAuthorEmailEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitAuthorNameFlag, Name: commitAuthorNameFlag,
Usage: "commit author name", Usage: "commit author name",
EnvVar: environ.CommitAuthorNameEnvVar, EnvVars: []string{environ.CommitAuthorNameEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitBeforeFlag, Name: commitBeforeFlag,
Usage: "commit before", Usage: "commit before",
EnvVar: environ.CommitBeforeEnvVar, EnvVars: []string{environ.CommitBeforeEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitBranchFlag, Name: commitBranchFlag,
Usage: "commit branch", Usage: "commit branch",
EnvVar: environ.CommitBranchEnvVar, EnvVars: []string{environ.CommitBranchEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitLinkFlag, Name: commitLinkFlag,
Usage: "commit link", Usage: "commit link",
EnvVar: environ.CommitLinkEnvVar, EnvVars: []string{environ.CommitLinkEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitMessageFlag, Name: commitMessageFlag,
Usage: "commit message", Usage: "commit message",
EnvVar: environ.CommitMessageEnvVar, EnvVars: []string{environ.CommitMessageEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitRefFlag, Name: commitRefFlag,
Usage: "commit ref", Usage: "commit ref",
EnvVar: environ.CommitRefEnvVar, EnvVars: []string{environ.CommitRefEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: commitSHAFlag, Name: commitSHAFlag,
Usage: "commit sha", Usage: "commit sha",
EnvVar: environ.CommitSHAEnvVar, EnvVars: []string{environ.CommitSHAEnvVar},
}, },
} }
} }
@ -413,60 +413,70 @@ const (
// stageFlags has the cli.Flags for the plugin.Stage // stageFlags has the cli.Flags for the plugin.Stage
func stageFlags() []cli.Flag { func stageFlags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.StringFlag{ &cli.StringFlag{
Name: stageArchFlag, Name: stageArchFlag,
Usage: "stage arch", Usage: "stage arch",
EnvVar: environ.StageArchEnvVar, EnvVars: []string{environ.StageArchEnvVar},
}, },
cli.StringSliceFlag{ &cli.StringSliceFlag{
Name: stageDependsOnFlag, Name: stageDependsOnFlag,
Usage: "stage depends on", Usage: "stage depends on",
EnvVar: environ.StageDependsOnEnvVar, EnvVars: []string{environ.StageDependsOnEnvVar},
}, },
cli.Int64Flag{ &cli.Int64Flag{
Name: stageFinishedFlag, Name: stageFinishedFlag,
Usage: "stage finished", Usage: "stage finished",
EnvVar: environ.StageFinishedEnvVar, EnvVars: []string{environ.StageFinishedEnvVar},
}, cli.StringFlag{ },
Name: stageKindFlag, &cli.StringFlag{
Usage: "stage kind", Name: stageKindFlag,
EnvVar: environ.StageKindEnvVar, Usage: "stage kind",
}, cli.StringFlag{ EnvVars: []string{environ.StageKindEnvVar},
Name: stageMachineFlag, },
Usage: "stage machine", &cli.StringFlag{
EnvVar: environ.StageMachineEnvVar, Name: stageMachineFlag,
}, cli.StringFlag{ Usage: "stage machine",
Name: stageNameFlag, EnvVars: []string{environ.StageMachineEnvVar},
Usage: "stage name", },
EnvVar: environ.StageNameEnvVar, &cli.StringFlag{
}, cli.IntFlag{ Name: stageNameFlag,
Name: stageNumberFlag, Usage: "stage name",
Usage: "stage number", EnvVars: []string{environ.StageNameEnvVar},
EnvVar: environ.StageNumberEnvVar, },
}, cli.StringFlag{ &cli.IntFlag{
Name: stageOSFlag, Name: stageNumberFlag,
Usage: "stage os", Usage: "stage number",
EnvVar: environ.StageOSEnvVar, EnvVars: []string{environ.StageNumberEnvVar},
}, cli.Int64Flag{ },
Name: stageStartedFlag, &cli.StringFlag{
Usage: "stage started", Name: stageOSFlag,
EnvVar: environ.StageStartedEnvVar, Usage: "stage os",
}, cli.StringFlag{ EnvVars: []string{environ.StageOSEnvVar},
Name: stageStatusFlag, },
Usage: "stage status", &cli.Int64Flag{
EnvVar: environ.StageStatusEnvVar, Name: stageStartedFlag,
}, cli.StringFlag{ Usage: "stage started",
Name: stageTypeFlag, EnvVars: []string{environ.StageStartedEnvVar},
Usage: "stage type", },
EnvVar: environ.StageTypeEnvVar, &cli.StringFlag{
}, cli.StringFlag{ Name: stageStatusFlag,
Name: stageVariantFlag, Usage: "stage status",
Usage: "stage variant", EnvVars: []string{environ.StageStatusEnvVar},
EnvVar: environ.StageVariantEnvVar, },
}, cli.StringFlag{ &cli.StringFlag{
Name: stageVersionFlag, Name: stageTypeFlag,
Usage: "stage version", Usage: "stage type",
EnvVar: environ.StageVersionEnvVar, EnvVars: []string{environ.StageTypeEnvVar},
},
&cli.StringFlag{
Name: stageVariantFlag,
Usage: "stage variant",
EnvVars: []string{environ.StageVariantEnvVar},
},
&cli.StringFlag{
Name: stageVersionFlag,
Usage: "stage version",
EnvVars: []string{environ.StageVersionEnvVar},
}, },
} }
} }
@ -504,15 +514,15 @@ const (
// stepFlags has the cli.Flags for the plugin.Step. // stepFlags has the cli.Flags for the plugin.Step.
func stepFlags() []cli.Flag { func stepFlags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.StringFlag{ &cli.StringFlag{
Name: stepNameFlag, Name: stepNameFlag,
Usage: "step name", Usage: "step name",
EnvVar: environ.StepNameEnvVar, EnvVars: []string{environ.StepNameEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: stepNumberFlag, Name: stepNumberFlag,
Usage: "step number", Usage: "step number",
EnvVar: environ.StepNumberEnvVar, EnvVars: []string{environ.StepNumberEnvVar},
}, },
} }
} }
@ -543,45 +553,45 @@ const (
// semVerFlags has the cli.Flags for the plugin.SemVer. // semVerFlags has the cli.Flags for the plugin.SemVer.
func semVerFlags() []cli.Flag { func semVerFlags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.StringFlag{ &cli.StringFlag{
Name: semVerBuildFlag, Name: semVerBuildFlag,
Usage: "semver build", Usage: "semver build",
EnvVar: environ.SemVerBuildEnvVar, EnvVars: []string{environ.SemVerBuildEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: semVerErrorFlag, Name: semVerErrorFlag,
Usage: "semver error", Usage: "semver error",
EnvVar: environ.SemVerErrorEnvVar, EnvVars: []string{environ.SemVerErrorEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: semVerMajorFlag, Name: semVerMajorFlag,
Usage: "semver major", Usage: "semver major",
EnvVar: environ.SemVerMajorEnvVar, EnvVars: []string{environ.SemVerMajorEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: semVerMinorFlag, Name: semVerMinorFlag,
Usage: "semver minor", Usage: "semver minor",
EnvVar: environ.SemVerMinorEnvVar, EnvVars: []string{environ.SemVerMinorEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: semVerPatchFlag, Name: semVerPatchFlag,
Usage: "semver patch", Usage: "semver patch",
EnvVar: environ.SemVerPatchEnvVar, EnvVars: []string{environ.SemVerPatchEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: semVerPrereleaseFlag, Name: semVerPrereleaseFlag,
Usage: "semver prerelease", Usage: "semver prerelease",
EnvVar: environ.SemVerPrereleaseEnvVar, EnvVars: []string{environ.SemVerPrereleaseEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: semVerShortFlag, Name: semVerShortFlag,
Usage: "semver short", Usage: "semver short",
EnvVar: environ.SemVerShortEnvVar, EnvVars: []string{environ.SemVerShortEnvVar},
}, },
cli.StringFlag{ &cli.StringFlag{
Name: semVerVersionFlag, Name: semVerVersionFlag,
Usage: "semver version", Usage: "semver version",
EnvVar: environ.SemVerVersionEnvVar, EnvVars: []string{environ.SemVerVersionEnvVar},
}, },
} }
} }