Skip to content

Commit

Permalink
Align dev dependencies (#2748)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverdlov93 authored Nov 7, 2024
1 parent 90f4c20 commit f3a9402
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 43 deletions.
55 changes: 42 additions & 13 deletions buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ func pullCmd(c *cli.Context, image string) error {
if show, err := cliutils.ShowGenericCmdHelpIfNeeded(c, c.Args(), "dockerpullhelp"); show || err != nil {
return err
}
_, rtDetails, _, skipLogin, filteredDockerArgs, buildConfiguration, err := commandsUtils.ExtractDockerOptionsFromArgs(c.Args())
_, rtDetails, _, skipLogin, filteredDockerArgs, buildConfiguration, err := extractDockerOptionsFromArgs(c.Args())
if err != nil {
return err
}
Expand All @@ -761,7 +761,7 @@ func pushCmd(c *cli.Context, image string) (err error) {
if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil {
return err
}
threads, rtDetails, detailedSummary, skipLogin, filteredDockerArgs, buildConfiguration, err := commandsUtils.ExtractDockerOptionsFromArgs(c.Args())
threads, rtDetails, detailedSummary, skipLogin, filteredDockerArgs, buildConfiguration, err := extractDockerOptionsFromArgs(c.Args())
if err != nil {
return
}
Expand Down Expand Up @@ -794,14 +794,42 @@ func dockerNativeCmd(c *cli.Context) error {
if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil {
return err
}
_, _, _, _, cleanArgs, _, err := commandsUtils.ExtractDockerOptionsFromArgs(c.Args())
_, _, _, _, cleanArgs, _, err := extractDockerOptionsFromArgs(c.Args())
if err != nil {
return err
}
cm := containerutils.NewManager(containerutils.DockerClient)
return cm.RunNativeCmd(cleanArgs)
}

// Remove all the none docker CLI flags from args.
func extractDockerOptionsFromArgs(args []string) (threads int, serverDetails *coreConfig.ServerDetails, detailedSummary, skipLogin bool, cleanArgs []string, buildConfig *build.BuildConfiguration, err error) {
cleanArgs = append([]string(nil), args...)
var serverId string
cleanArgs, serverId, err = coreutils.ExtractServerIdFromCommand(cleanArgs)
if err != nil {
return
}
serverDetails, err = coreConfig.GetSpecificConfig(serverId, true, true)
if err != nil {
return
}
cleanArgs, threads, err = coreutils.ExtractThreadsFromArgs(cleanArgs, 3)
if err != nil {
return
}
cleanArgs, detailedSummary, err = coreutils.ExtractDetailedSummaryFromArgs(cleanArgs)
if err != nil {
return
}
cleanArgs, skipLogin, err = coreutils.ExtractSkipLoginFromArgs(cleanArgs)
if err != nil {
return
}
cleanArgs, buildConfig, err = build.ExtractBuildDetailsFromArgs(cleanArgs)
return
}

// Assuming command name is the first argument that isn't a flag.
// Returns the command name, and the filtered arguments slice without it.
func getCommandName(orgArgs []string) (string, []string) {
Expand Down Expand Up @@ -933,19 +961,20 @@ func pythonCmd(c *cli.Context, projectType project.ProjectType) error {
cmdName, filteredArgs := getCommandName(orgArgs)
switch projectType {
case project.Pip:
pythonCommand := python.NewPipCommand()
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pythonCommand)
pipCommand := python.NewPipCommand()
pipCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pipCommand)
case project.Pipenv:
pythonCommand := python.NewPipenvCommand()
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pythonCommand)
pipenvCommand := python.NewPipenvCommand()
pipenvCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pipenvCommand)
case project.Poetry:
pythonCommand := python.NewPoetryCommand()
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pythonCommand)
poetryCommand := python.NewPoetryCommand()
poetryCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(poetryCommand)
default:
return errorutils.CheckErrorf("%s is not supported", projectType)
}
return errorutils.CheckErrorf("%s is not supported", projectType)
}

func terraformCmd(c *cli.Context) error {
Expand Down
20 changes: 0 additions & 20 deletions general/invite/invite.go

This file was deleted.

8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ require (
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jedib0t/go-pretty/v6 v6.5.9 // indirect
github.com/jedib0t/go-pretty/v6 v6.6.1 // indirect
github.com/jfrog/froggit-go v1.16.2 // indirect
github.com/jfrog/jfrog-apps-config v1.0.1 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
Expand Down Expand Up @@ -167,12 +167,12 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/srmish-jfrog/jfrog-cli-core/v2 v2.31.1-0.20241031183701-84b01c5a0ce0
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20241107130834-59ac9764f8b9

// replace github.com/jfrog/jfrog-cli-security => github.com/attiasas/jfrog-cli-security v0.0.0-20240904061406-f368939ce3a0
replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.12.5-0.20241107141149-42cf964808a1

// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240918081224-1c584cc334c7

// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20240918150101-ad5b10435a12

// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog dev
// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog dev
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jedib0t/go-pretty/v6 v6.5.9 h1:ACteMBRrrmm1gMsXe9PSTOClQ63IXDUt03H5U+UV8OU=
github.com/jedib0t/go-pretty/v6 v6.5.9/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E=
github.com/jedib0t/go-pretty/v6 v6.6.1 h1:iJ65Xjb680rHcikRj6DSIbzCex2huitmc7bDtxYVWyc=
github.com/jedib0t/go-pretty/v6 v6.6.1/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E=
github.com/jfrog/archiver/v3 v3.6.1 h1:LOxnkw9pOn45DzCbZNFV6K0+6dCsQ0L8mR3ZcujO5eI=
github.com/jfrog/archiver/v3 v3.6.1/go.mod h1:VgR+3WZS4N+i9FaDwLZbq+jeU4B4zctXL+gL4EMzfLw=
github.com/jfrog/build-info-go v1.10.3 h1:9nqBdZD6xkuxiOvxg+idZ79QLFWQNuucvKkl8Xb42kw=
Expand All @@ -173,12 +173,12 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-artifactory v0.1.6 h1:bMfJsrLQJw0dZp4nqUf1xOmtY0rpCatW/I5q88x+fhQ=
github.com/jfrog/jfrog-cli-artifactory v0.1.6/go.mod h1:jbNb22ebtupcjdhrdGq0VBew2vWG6VUK04xxGNDfynE=
github.com/jfrog/jfrog-cli-core/v2 v2.56.5 h1:jigHavEpmfBV5tRHkVSW4B/GG5F54UOdNEt2jVyP0qc=
github.com/jfrog/jfrog-cli-core/v2 v2.56.5/go.mod h1:XlN2hMNiNFeNM9aR8H29RZkenI39lDe+LE+BTm1dM6k=
github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20241107130834-59ac9764f8b9 h1:zAlXZrJRbThdMtA5UDjC0RouJ/OVY/zv9+VI54NTbFo=
github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20241107130834-59ac9764f8b9/go.mod h1:2E9LLSLDYNwp2585LyMuDaNMuq+ohvgZYg7K5EY933o=
github.com/jfrog/jfrog-cli-platform-services v1.4.0 h1:g6A30+tOfXd1h6VASeNwH+5mhs5bPQJ0MFzZs/4nlvs=
github.com/jfrog/jfrog-cli-platform-services v1.4.0/go.mod h1:Ky4SDXuMeaiNP/5zMT1YSzIuXG+cNYYOl8BaEA7Awbc=
github.com/jfrog/jfrog-cli-security v1.12.4 h1:X36XIazDOH5YCGLx36QFDGTtvfJHixawakU601nYGmA=
github.com/jfrog/jfrog-cli-security v1.12.4/go.mod h1:eT+Z6HNh35eBeeIaLww8Gf7jHI3CpifBHIJ81bcwR/s=
github.com/jfrog/jfrog-cli-security v1.12.5-0.20241107141149-42cf964808a1 h1:xbyIbEI6CSX87TyokXfzlEfyMnHjS6xqD7zuV2dep6c=
github.com/jfrog/jfrog-cli-security v1.12.5-0.20241107141149-42cf964808a1/go.mod h1:ZovKCEpt1eqQGiulh3H9+JmYgWR9r9qoKtOYiGb5eAs=
github.com/jfrog/jfrog-client-go v1.47.4 h1:4FAuDDvoDRy9LEFe1WwUO5prBXkgyhaWGEZ0vXYL/Z4=
github.com/jfrog/jfrog-client-go v1.47.4/go.mod h1:NepfaidmK/xiKsVC+0Ur9sANOqL6io8Y7pSaCau7J6o=
github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI=
Expand Down

0 comments on commit f3a9402

Please sign in to comment.