Skip to content

Commit 7453f01

Browse files
authored
Merge branch 'dev' into dev
2 parents 296600d + 681bbc8 commit 7453f01

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+
}

0 commit comments

Comments
 (0)