Skip to content

Commit de30dc0

Browse files
Merge remote-tracking branch 'origin/dev' into v2
2 parents ce298c1 + 8ba80d6 commit de30dc0

File tree

16 files changed

+128
-106
lines changed

16 files changed

+128
-106
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ node("docker-ubuntu20-xlarge") {
3131
repo = 'jfrog-cli'
3232
sh 'rm -rf temp'
3333
sh 'mkdir temp'
34-
def goRoot = tool 'go-1.23.2'
34+
def goRoot = tool 'go-1.23.3'
3535
env.GOROOT="$goRoot"
3636
env.PATH+=":${goRoot}/bin:/tmp/node-${nodeVersion}-linux-x64/bin"
3737
env.GO111MODULE="on"

artifactory/cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"errors"
55
"fmt"
66
"github.com/jfrog/jfrog-cli/docs/artifactory/cocoapodsconfig"
7+
"github.com/jfrog/jfrog-cli/docs/artifactory/swiftconfig"
78
"os"
89
"strconv"
910
"strings"
@@ -420,6 +421,19 @@ func GetCommands() []cli.Command {
420421
return cliutils.RunConfigCmdWithDeprecationWarning("cocoapodsc", "rt", project.Cocoapods, c, cliutils.CreateConfigCmd)
421422
},
422423
},
424+
{
425+
Name: "swift-config",
426+
Hidden: true,
427+
Aliases: []string{"swiftc"},
428+
Flags: cliutils.GetCommandFlags(cliutils.SwiftConfig),
429+
Usage: gradleconfig.GetDescription(),
430+
HelpName: corecommon.CreateUsage("rt swift-config", swiftconfig.GetDescription(), swiftconfig.Usage),
431+
ArgsUsage: common.CreateEnvVars(),
432+
BashComplete: corecommon.CreateBashCompletionFunc(),
433+
Action: func(c *cli.Context) error {
434+
return cliutils.RunConfigCmdWithDeprecationWarning("swiftc", "rt", project.Swift, c, cliutils.CreateConfigCmd)
435+
},
436+
},
423437
{
424438
Name: "docker-promote",
425439
Flags: cliutils.GetCommandFlags(cliutils.DockerPromote),

build/docker/slim/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG repo_name_21
22
# Remove ${repo_name_21} to pull from Docker Hub.
3-
FROM ${repo_name_21}/jfrog-docker/golang:1.23.2-alpine as builder
3+
FROM ${repo_name_21}/jfrog-docker/golang:1.23.3-alpine as builder
44
ARG image_name=jfrog-cli
55
ARG cli_executable_name
66
WORKDIR /${image_name}

build/npm/v2-jf/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/npm/v2-jf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jfrog-cli-v2-jf",
3-
"version": "2.71.3",
3+
"version": "2.71.4",
44
"description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸",
55
"homepage": "https://github.com/jfrog/jfrog-cli",
66
"preferGlobal": true,

build/npm/v2/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/npm/v2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jfrog-cli-v2",
3-
"version": "2.71.3",
3+
"version": "2.71.4",
44
"description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸",
55
"homepage": "https://github.com/jfrog/jfrog-cli",
66
"preferGlobal": true,

buildtools/cli.go

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ func pullCmd(c *cli.Context, image string) error {
738738
if show, err := cliutils.ShowGenericCmdHelpIfNeeded(c, c.Args(), "dockerpullhelp"); show || err != nil {
739739
return err
740740
}
741-
_, rtDetails, _, skipLogin, filteredDockerArgs, buildConfiguration, err := commandsUtils.ExtractDockerOptionsFromArgs(c.Args())
741+
_, rtDetails, _, skipLogin, filteredDockerArgs, buildConfiguration, err := extractDockerOptionsFromArgs(c.Args())
742742
if err != nil {
743743
return err
744744
}
@@ -761,7 +761,7 @@ func pushCmd(c *cli.Context, image string) (err error) {
761761
if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil {
762762
return err
763763
}
764-
threads, rtDetails, detailedSummary, skipLogin, filteredDockerArgs, buildConfiguration, err := commandsUtils.ExtractDockerOptionsFromArgs(c.Args())
764+
threads, rtDetails, detailedSummary, skipLogin, filteredDockerArgs, buildConfiguration, err := extractDockerOptionsFromArgs(c.Args())
765765
if err != nil {
766766
return
767767
}
@@ -794,14 +794,42 @@ func dockerNativeCmd(c *cli.Context) error {
794794
if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil {
795795
return err
796796
}
797-
_, _, _, _, cleanArgs, _, err := commandsUtils.ExtractDockerOptionsFromArgs(c.Args())
797+
_, _, _, _, cleanArgs, _, err := extractDockerOptionsFromArgs(c.Args())
798798
if err != nil {
799799
return err
800800
}
801801
cm := containerutils.NewManager(containerutils.DockerClient)
802802
return cm.RunNativeCmd(cleanArgs)
803803
}
804804

805+
// Remove all the none docker CLI flags from args.
806+
func extractDockerOptionsFromArgs(args []string) (threads int, serverDetails *coreConfig.ServerDetails, detailedSummary, skipLogin bool, cleanArgs []string, buildConfig *build.BuildConfiguration, err error) {
807+
cleanArgs = append([]string(nil), args...)
808+
var serverId string
809+
cleanArgs, serverId, err = coreutils.ExtractServerIdFromCommand(cleanArgs)
810+
if err != nil {
811+
return
812+
}
813+
serverDetails, err = coreConfig.GetSpecificConfig(serverId, true, true)
814+
if err != nil {
815+
return
816+
}
817+
cleanArgs, threads, err = coreutils.ExtractThreadsFromArgs(cleanArgs, 3)
818+
if err != nil {
819+
return
820+
}
821+
cleanArgs, detailedSummary, err = coreutils.ExtractDetailedSummaryFromArgs(cleanArgs)
822+
if err != nil {
823+
return
824+
}
825+
cleanArgs, skipLogin, err = coreutils.ExtractSkipLoginFromArgs(cleanArgs)
826+
if err != nil {
827+
return
828+
}
829+
cleanArgs, buildConfig, err = build.ExtractBuildDetailsFromArgs(cleanArgs)
830+
return
831+
}
832+
805833
// Assuming command name is the first argument that isn't a flag.
806834
// Returns the command name, and the filtered arguments slice without it.
807835
func getCommandName(orgArgs []string) (string, []string) {
@@ -933,19 +961,20 @@ func pythonCmd(c *cli.Context, projectType project.ProjectType) error {
933961
cmdName, filteredArgs := getCommandName(orgArgs)
934962
switch projectType {
935963
case project.Pip:
936-
pythonCommand := python.NewPipCommand()
937-
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
938-
return commands.Exec(pythonCommand)
964+
pipCommand := python.NewPipCommand()
965+
pipCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
966+
return commands.Exec(pipCommand)
939967
case project.Pipenv:
940-
pythonCommand := python.NewPipenvCommand()
941-
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
942-
return commands.Exec(pythonCommand)
968+
pipenvCommand := python.NewPipenvCommand()
969+
pipenvCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
970+
return commands.Exec(pipenvCommand)
943971
case project.Poetry:
944-
pythonCommand := python.NewPoetryCommand()
945-
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
946-
return commands.Exec(pythonCommand)
972+
poetryCommand := python.NewPoetryCommand()
973+
poetryCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
974+
return commands.Exec(poetryCommand)
975+
default:
976+
return errorutils.CheckErrorf("%s is not supported", projectType)
947977
}
948-
return errorutils.CheckErrorf("%s is not supported", projectType)
949978
}
950979

951980
func terraformCmd(c *cli.Context) error {

config/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func addOrEdit(c *cli.Context, operation configOperation) error {
136136
}
137137
configCmd := commands.NewConfigCommand(commands.AddOrEdit, serverId).SetDetails(configCommandConfiguration.ServerDetails).SetInteractive(configCommandConfiguration.Interactive).
138138
SetEncPassword(configCommandConfiguration.EncPassword).SetUseBasicAuthOnly(configCommandConfiguration.BasicAuthOnly)
139-
return configCmd.Run()
139+
return configCmd.ExecAndReportUsage()
140140
}
141141

142142
func showCmd(c *cli.Context) error {

docs/artifactory/swiftconfig/help.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package swiftconfig
2+
3+
var Usage = []string{"rt swift-config [command options]"}
4+
5+
func GetDescription() string {
6+
return "Generate swift build configuration."
7+
}

general/invite/invite.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

go.mod

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/jfrog/jfrog-cli
22

3-
go 1.23.2
3+
go 1.23.3
44

55
replace (
66
// Should not be updated to 0.2.6 due to a bug (https://github.com/jfrog/jfrog-cli-core/pull/372)
@@ -16,20 +16,20 @@ require (
1616
github.com/docker/docker v27.3.1+incompatible
1717
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1
1818
github.com/jfrog/archiver/v3 v3.6.1
19-
github.com/jfrog/build-info-go v1.10.3
19+
github.com/jfrog/build-info-go v1.10.5
2020
github.com/jfrog/gofrog v1.7.6
2121
github.com/jfrog/jfrog-cli-artifactory v0.1.6
22-
github.com/jfrog/jfrog-cli-core/v2 v2.56.5
22+
github.com/jfrog/jfrog-cli-core/v2 v2.56.8
2323
github.com/jfrog/jfrog-cli-platform-services v1.4.0
24-
github.com/jfrog/jfrog-cli-security v1.12.4
25-
github.com/jfrog/jfrog-client-go v1.47.4
24+
github.com/jfrog/jfrog-cli-security v1.12.5
25+
github.com/jfrog/jfrog-client-go v1.48.0
2626
github.com/jszwec/csvutil v1.10.0
2727
github.com/manifoldco/promptui v0.9.0
2828
github.com/stretchr/testify v1.9.0
2929
github.com/testcontainers/testcontainers-go v0.34.0
3030
github.com/urfave/cli v1.22.16
3131
github.com/xeipuuv/gojsonschema v1.2.0
32-
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
32+
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f
3333
gopkg.in/yaml.v2 v2.4.0
3434
)
3535

@@ -40,7 +40,7 @@ require (
4040
github.com/BurntSushi/toml v1.4.0 // indirect
4141
github.com/CycloneDX/cyclonedx-go v0.9.0 // indirect
4242
github.com/Microsoft/go-winio v0.6.2 // indirect
43-
github.com/ProtonMail/go-crypto v1.0.0 // indirect
43+
github.com/ProtonMail/go-crypto v1.1.2 // indirect
4444
github.com/VividCortex/ewma v1.2.0 // indirect
4545
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
4646
github.com/andybalholm/brotli v1.1.0 // indirect
@@ -71,7 +71,7 @@ require (
7171
github.com/go-logr/stdr v1.2.2 // indirect
7272
github.com/go-ole/go-ole v1.2.6 // indirect
7373
github.com/gogo/protobuf v1.3.2 // indirect
74-
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
74+
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
7575
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
7676
github.com/golang/snappy v0.0.4 // indirect
7777
github.com/google/go-github/v56 v56.0.0 // indirect
@@ -83,7 +83,7 @@ require (
8383
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
8484
github.com/hashicorp/hcl v1.0.0 // indirect
8585
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
86-
github.com/jedib0t/go-pretty/v6 v6.5.9 // indirect
86+
github.com/jedib0t/go-pretty/v6 v6.6.1 // indirect
8787
github.com/jfrog/froggit-go v1.16.2 // indirect
8888
github.com/jfrog/jfrog-apps-config v1.0.1 // indirect
8989
github.com/kevinburke/ssh_config v1.2.0 // indirect
@@ -153,23 +153,23 @@ require (
153153
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
154154
go.opentelemetry.io/otel/trace v1.31.0 // indirect
155155
go.uber.org/multierr v1.11.0 // indirect
156-
golang.org/x/crypto v0.28.0 // indirect
157-
golang.org/x/mod v0.21.0 // indirect
158-
golang.org/x/net v0.30.0 // indirect
156+
golang.org/x/crypto v0.29.0 // indirect
157+
golang.org/x/mod v0.22.0 // indirect
158+
golang.org/x/net v0.31.0 // indirect
159159
golang.org/x/oauth2 v0.20.0 // indirect
160-
golang.org/x/sync v0.8.0 // indirect
161-
golang.org/x/sys v0.26.0 // indirect
162-
golang.org/x/term v0.25.0 // indirect
163-
golang.org/x/text v0.19.0 // indirect
160+
golang.org/x/sync v0.9.0 // indirect
161+
golang.org/x/sys v0.27.0 // indirect
162+
golang.org/x/term v0.26.0 // indirect
163+
golang.org/x/text v0.20.0 // indirect
164164
golang.org/x/time v0.5.0 // indirect
165165
gopkg.in/ini.v1 v1.67.0 // indirect
166166
gopkg.in/warnings.v0 v0.1.2 // indirect
167167
gopkg.in/yaml.v3 v3.0.1 // indirect
168168
)
169169

170-
// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/srmish-jfrog/jfrog-cli-core/v2 v2.31.1-0.20241031183701-84b01c5a0ce0
170+
// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20241113152357-24197a744331
171171

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

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

0 commit comments

Comments
 (0)