From 55bdffc8318202990d6daada49173dddaa752ceb Mon Sep 17 00:00:00 2001 From: Shachar Menashe <92059693+srmish-jfrog@users.noreply.github.com> Date: Sun, 3 Nov 2024 17:48:12 +0200 Subject: [PATCH] cocoapods-config (#2743) --- artifactory/cli.go | 14 ++++++++++++++ docs/artifactory/cocoapodsconfig/help.go | 7 +++++++ go.mod | 2 +- go.sum | 4 ++-- utils/cliutils/commandsflags.go | 4 ++++ 5 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 docs/artifactory/cocoapodsconfig/help.go diff --git a/artifactory/cli.go b/artifactory/cli.go index f282938f3..fb9c2423d 100644 --- a/artifactory/cli.go +++ b/artifactory/cli.go @@ -3,6 +3,7 @@ package artifactory import ( "errors" "fmt" + "github.com/jfrog/jfrog-cli/docs/artifactory/cocoapodsconfig" "os" "strconv" "strings" @@ -406,6 +407,19 @@ func GetCommands() []cli.Command { return cliutils.RunNativeCmdWithDeprecationWarning("gradle", project.Gradle, c, buildtools.GradleCmd) }, }, + { + Name: "cocoapods-config", + Hidden: true, + Aliases: []string{"cocoapodsc"}, + Flags: cliutils.GetCommandFlags(cliutils.CocoapodsConfig), + Usage: gradleconfig.GetDescription(), + HelpName: corecommon.CreateUsage("rt cocoapods-config", cocoapodsconfig.GetDescription(), cocoapodsconfig.Usage), + ArgsUsage: common.CreateEnvVars(), + BashComplete: corecommon.CreateBashCompletionFunc(), + Action: func(c *cli.Context) error { + return cliutils.RunConfigCmdWithDeprecationWarning("cocoapodsc", "rt", project.Cocoapods, c, cliutils.CreateConfigCmd) + }, + }, { Name: "docker-promote", Flags: cliutils.GetCommandFlags(cliutils.DockerPromote), diff --git a/docs/artifactory/cocoapodsconfig/help.go b/docs/artifactory/cocoapodsconfig/help.go new file mode 100644 index 000000000..a334e48a1 --- /dev/null +++ b/docs/artifactory/cocoapodsconfig/help.go @@ -0,0 +1,7 @@ +package cocoapodsconfig + +var Usage = []string{"rt cocoapods-config [command options]"} + +func GetDescription() string { + return "Generate cocoapods build configuration." +} diff --git a/go.mod b/go.mod index ebefd8588..534e8f0d4 100644 --- a/go.mod +++ b/go.mod @@ -167,7 +167,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20241010143722-75cc82c172d3 +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-security => github.com/attiasas/jfrog-cli-security v0.0.0-20240904061406-f368939ce3a0 diff --git a/go.sum b/go.sum index 041466590..c86388826 100644 --- a/go.sum +++ b/go.sum @@ -173,8 +173,6 @@ 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.4 h1:LqByz2FmVTDQm/u2xGeTL6O8Hs9JadaTj3QMpel9ZwY= -github.com/jfrog/jfrog-cli-core/v2 v2.56.4/go.mod h1:AwQ9WuOA64g3torX9K5kP0xFAAbchfRInhZwbufoW+Q= 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.2 h1:eO0R15jR7vIYyQZfHMDZUb7bOOLG/VpUw33RYFKo4qw= @@ -321,6 +319,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= +github.com/srmish-jfrog/jfrog-cli-core/v2 v2.31.1-0.20241031183701-84b01c5a0ce0 h1:TwYxCa8Rmscv4MuA5u/495BqNs7D5xteWwhrCBQfn0A= +github.com/srmish-jfrog/jfrog-cli-core/v2 v2.31.1-0.20241031183701-84b01c5a0ce0/go.mod h1:AwQ9WuOA64g3torX9K5kP0xFAAbchfRInhZwbufoW+Q= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= diff --git a/utils/cliutils/commandsflags.go b/utils/cliutils/commandsflags.go index 957c2f6c8..0274ad6c0 100644 --- a/utils/cliutils/commandsflags.go +++ b/utils/cliutils/commandsflags.go @@ -37,6 +37,7 @@ const ( GitLfsClean = "git-lfs-clean" Mvn = "mvn" MvnConfig = "mvn-config" + CocoapodsConfig = "cocoapods-config" Gradle = "gradle" GradleConfig = "gradle-config" DockerPromote = "docker-promote" @@ -1815,6 +1816,9 @@ var commandFlags = map[string][]string{ url, user, password, accessToken, sshPassphrase, sshKeyPath, serverId, refs, glcRepo, glcDryRun, glcQuiet, InsecureTls, retries, retryWaitTime, }, + CocoapodsConfig: { + global, serverIdResolve, repoResolve, + }, MvnConfig: { global, serverIdResolve, serverIdDeploy, repoResolveReleases, repoResolveSnapshots, repoDeployReleases, repoDeploySnapshots, includePatterns, excludePatterns, UseWrapper, },