Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
import (
"errors"
"fmt"
"os"
"strconv"
"strings"

"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/python"
"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/setup"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/utils"
"github.com/jfrog/jfrog-cli-core/v2/utils/ioutils"
"github.com/jfrog/jfrog-cli-security/utils/techutils"
"github.com/jfrog/jfrog-cli/docs/buildtools/rubyconfig"
setupdocs "github.com/jfrog/jfrog-cli/docs/buildtools/setup"
"os"
"strconv"
"strings"

"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/container"
"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/dotnet"
Expand Down Expand Up @@ -127,6 +129,19 @@
return cliutils.CreateConfigCmd(c, project.Gradle)
},
},
{
Name: "ruby-config",
Aliases: []string{"rubyc"},
Flags: cliutils.GetCommandFlags(cliutils.RubyConfig),
Usage: gradleconfig.GetDescription(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why gradeconfig description ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the typo

HelpName: corecommon.CreateUsage("ruby-config", rubyconfig.GetDescription(), rubyconfig.Usage),
ArgsUsage: common.CreateEnvVars(),
BashComplete: corecommon.CreateBashCompletionFunc(),
Category: buildToolsCategory,
Action: func(c *cli.Context) error {
return cliutils.CreateConfigCmd(c, project.Ruby)

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Go-Sec ubuntu-latest

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Lint ubuntu

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

undefined: project.Ruby) (typecheck)

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

undefined: project.Ruby) (typecheck)

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

undefined: project.Ruby (typecheck)

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Lint windows

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Lint macos

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Script tests (ubuntu-latest)

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Script tests (macos-13)

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Script tests (ubuntu-22.04)

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Script tests (macos-latest)

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Script tests (windows-latest)

undefined: project.Ruby

Check failure on line 142 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Script tests (windows-2019)

undefined: project.Ruby
},
},
{
Name: "gradle",
Flags: cliutils.GetCommandFlags(cliutils.Gradle),
Expand Down
16 changes: 16 additions & 0 deletions docs/buildtools/ruby/help.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ruby

import "github.com/jfrog/jfrog-cli/docs/common"

var Usage = []string{"ruby <tasks and options> [command options]"}

var EnvVar = []string{common.JfrogCliReleasesRepo, common.JfrogCliDependenciesDir}

func GetDescription() string {
return "Run Ruby build."
}

func GetArguments() string {
return ` tasks and options
Tasks and options to run with Ruby command. For example, -b path/to/GemFile.`
}
7 changes: 7 additions & 0 deletions docs/buildtools/rubyconfig/help.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package rubyconfig

var Usage = []string{"ruby-config [command options]"}

func GetDescription() string {
return "Generate ruby build configuration."
}
8 changes: 7 additions & 1 deletion utils/cliutils/commandsflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package cliutils

import (
"fmt"
"github.com/jfrog/jfrog-cli-artifactory/cliutils/flagkit"
"sort"
"strconv"

"github.com/jfrog/jfrog-cli-artifactory/cliutils/flagkit"

commonCliUtils "github.com/jfrog/jfrog-cli-core/v2/common/cliutils"
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"

Expand Down Expand Up @@ -41,6 +42,8 @@ const (
SwiftConfig = "swift-config"
Gradle = "gradle"
GradleConfig = "gradle-config"
Ruby = "ruby"
RubyConfig = "ruby-config"
DockerPromote = "docker-promote"
Docker = "docker"
DockerPush = "docker-push"
Expand Down Expand Up @@ -1821,6 +1824,9 @@ var commandFlags = map[string][]string{
global, serverIdResolve, serverIdDeploy, repoResolve, repoDeploy, usesPlugin, UseWrapper, deployMavenDesc,
deployIvyDesc, ivyDescPattern, ivyArtifactsPattern,
},
RubyConfig: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing Ruby

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only want to add the ruby-config, should I remove the ruby and only keep ruby-config ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

global, serverIdResolve, serverIdDeploy, repoResolve, repoDeploy,
},
Mvn: {
BuildName, BuildNumber, deploymentThreads, InsecureTls, Project, detailedSummary, xrayScan, xrOutput,
},
Expand Down
Loading