From 3f177a584828108a162c76d326d81f470dabcad0 Mon Sep 17 00:00:00 2001 From: Robi Nino Date: Tue, 30 Apr 2024 13:43:10 +0300 Subject: [PATCH 1/8] Support providing chunk size in multi part upload (#2517) --- .github/workflows/gradleTests.yml | 5 +++++ artifactory/cli_test.go | 12 +++++++----- go.mod | 4 ++-- go.sum | 8 ++++---- plugins_test.go | 2 +- utils/cliutils/cli_consts.go | 1 + utils/cliutils/commandsflags.go | 11 ++++++++--- utils/cliutils/utils.go | 17 +++++++++++++++++ 8 files changed, 45 insertions(+), 15 deletions(-) diff --git a/.github/workflows/gradleTests.yml b/.github/workflows/gradleTests.yml index b9b6762f2..6dd70516d 100644 --- a/.github/workflows/gradleTests.yml +++ b/.github/workflows/gradleTests.yml @@ -30,6 +30,11 @@ jobs: with: go-version: 1.20.x cache: false + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: diff --git a/artifactory/cli_test.go b/artifactory/cli_test.go index 0f6a59a13..5ef5b0f85 100644 --- a/artifactory/cli_test.go +++ b/artifactory/cli_test.go @@ -130,12 +130,14 @@ var createUploadConfigurationCases = []struct { expectedSplitCount int expectedThreads int expectedDeb string + expectedChunkSize int64 }{ - {"empty", []string{}, cliutils.UploadMinSplitMb, cliutils.UploadSplitCount, commonCliUtils.Threads, ""}, - {"min-split", []string{"min-split=101"}, 101, cliutils.UploadSplitCount, commonCliUtils.Threads, ""}, - {"split-count", []string{"split-count=6"}, cliutils.UploadMinSplitMb, 6, commonCliUtils.Threads, ""}, - {"threads", []string{"threads=6"}, cliutils.UploadMinSplitMb, cliutils.UploadSplitCount, 6, ""}, - {"deb", []string{"deb=jammy/main/i386"}, cliutils.UploadMinSplitMb, cliutils.UploadSplitCount, commonCliUtils.Threads, "jammy/main/i386"}, + {"empty", []string{}, cliutils.UploadMinSplitMb, cliutils.UploadSplitCount, commonCliUtils.Threads, "", cliutils.UploadChunkSizeMb}, + {"min-split", []string{"min-split=101"}, 101, cliutils.UploadSplitCount, commonCliUtils.Threads, "", cliutils.UploadChunkSizeMb}, + {"split-count", []string{"split-count=6"}, cliutils.UploadMinSplitMb, 6, commonCliUtils.Threads, "", cliutils.UploadChunkSizeMb}, + {"threads", []string{"threads=6"}, cliutils.UploadMinSplitMb, cliutils.UploadSplitCount, 6, "", cliutils.UploadChunkSizeMb}, + {"deb", []string{"deb=jammy/main/i386"}, cliutils.UploadMinSplitMb, cliutils.UploadSplitCount, commonCliUtils.Threads, "jammy/main/i386", cliutils.UploadChunkSizeMb}, + {"chunk-size", []string{"chunk-size=123"}, cliutils.UploadMinSplitMb, cliutils.UploadSplitCount, commonCliUtils.Threads, "", 123}, } func TestCreateUploadConfiguration(t *testing.T) { diff --git a/go.mod b/go.mod index 18aab7f9b..54758c390 100644 --- a/go.mod +++ b/go.mod @@ -137,9 +137,9 @@ 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.20240408074156-13680c04f22e +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240424135031-dac0f92a2aae -// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240408071430-62ee0279ac58 +replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240424133643-5bf715f66eac // replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.0.6-0.20240408061620-c9b84da33d5e diff --git a/go.sum b/go.sum index 9d04f7aec..08c072ba9 100644 --- a/go.sum +++ b/go.sum @@ -135,12 +135,12 @@ github.com/jfrog/gofrog v1.7.1 h1:ME1Meg4hukAT/7X6HUQCVSe4DNjMZACCP8aCY37EW/w= github.com/jfrog/gofrog v1.7.1/go.mod h1:X7bjfWoQDN0Z4FQGbE91j3gbPP7Urwzm4Z8tkvrlbRI= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-core/v2 v2.51.0 h1:nESbCpSTPZx1av0W9tdmWLxKaPSL1SaZinbZGtYNeFI= -github.com/jfrog/jfrog-cli-core/v2 v2.51.0/go.mod h1:064wSSHVI3ZIVi/a94yJqzs+ACM+9JK/u9tQ1sfTK6A= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240424135031-dac0f92a2aae h1:Lgn3WxoSc4YwhitPF2sPlqVviDZ4WRMI8eLOQqV9GZs= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240424135031-dac0f92a2aae/go.mod h1:/rNY4nIB8hIsL+MLGrZOgOYpY4QnJ+CHeTHPQDdGmOk= github.com/jfrog/jfrog-cli-security v1.1.0 h1:ifCjFJSa1D1pWyW/ADYPqnMkOddzkAT/WY4vHAufn1g= github.com/jfrog/jfrog-cli-security v1.1.0/go.mod h1:086t7e/einVAGfBXxRdEGDKovWt67I6SqUb1rcpdiZc= -github.com/jfrog/jfrog-client-go v1.40.1 h1:ISSSV7/IUS8R+QCPfH2lVKLburbv2Xn07fvNyDc17rI= -github.com/jfrog/jfrog-client-go v1.40.1/go.mod h1:FprEW0Sqhj6ZSFTFk9NCni+ovFAYMA3zCBmNX4hGXgQ= +github.com/jfrog/jfrog-client-go v1.28.1-0.20240424133643-5bf715f66eac h1:e/QfkFN/Qtkn1rBg/p7JCOMFLmE2EgfPBx57m2yIF1k= +github.com/jfrog/jfrog-client-go v1.28.1-0.20240424133643-5bf715f66eac/go.mod h1:FprEW0Sqhj6ZSFTFk9NCni+ovFAYMA3zCBmNX4hGXgQ= github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI= github.com/jszwec/csvutil v1.10.0/go.mod h1:/E4ONrmGkwmWsk9ae9jpXnv9QT8pLHEPcCirMFhxG9I= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= diff --git a/plugins_test.go b/plugins_test.go index d0cd684c0..8b477bfe4 100644 --- a/plugins_test.go +++ b/plugins_test.go @@ -25,7 +25,7 @@ import ( ) const officialPluginForTest = "rt-fs" -const officialPluginVersion = "v1.0.0" +const officialPluginVersion = "v1.1.5" const customPluginName = "custom-plugin" func TestPluginInstallUninstallOfficialRegistry(t *testing.T) { diff --git a/utils/cliutils/cli_consts.go b/utils/cliutils/cli_consts.go index ee93b282b..20e87000a 100644 --- a/utils/cliutils/cli_consts.go +++ b/utils/cliutils/cli_consts.go @@ -28,6 +28,7 @@ const ( UploadMinSplitMb = 200 UploadSplitCount = 5 UploadMaxSplitCount = 100 + UploadChunkSizeMb = 20 // Common Retries = 3 diff --git a/utils/cliutils/commandsflags.go b/utils/cliutils/commandsflags.go index 445c0f588..8a6a89c05 100644 --- a/utils/cliutils/commandsflags.go +++ b/utils/cliutils/commandsflags.go @@ -198,6 +198,7 @@ const ( Status = "status" MinSplit = "min-split" SplitCount = "split-count" + ChunkSize = "chunk-size" // Config flags interactive = "interactive" @@ -799,11 +800,15 @@ var flagsMap = map[string]cli.Flag{ }, uploadMinSplit: cli.StringFlag{ Name: MinSplit, - Usage: "[Default: " + strconv.Itoa(UploadMinSplitMb) + "] The minimum file size in MiB required to attempt a multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 storage.` `", + Usage: "[Default: " + strconv.Itoa(UploadMinSplitMb) + "] The minimum file size in MiB required to attempt a multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 or GCP storage.` `", }, uploadSplitCount: cli.StringFlag{ Name: SplitCount, - Usage: "[Default: " + strconv.Itoa(UploadSplitCount) + "] The maximum number of parts that can be concurrently uploaded per file during a multi-part upload. Set to 0 to disable multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 storage.` `", + Usage: "[Default: " + strconv.Itoa(UploadSplitCount) + "] The maximum number of parts that can be concurrently uploaded per file during a multi-part upload. Set to 0 to disable multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 or GCP storage.` `", + }, + ChunkSize: cli.StringFlag{ + Name: ChunkSize, + Usage: "[Default: " + strconv.Itoa(UploadChunkSizeMb) + "] The upload chunk size in MiB that can be concurrently uploaded during a multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 or GCP storage.` `", }, syncDeletesQuiet: cli.BoolFlag{ Name: quiet, @@ -1736,7 +1741,7 @@ var commandFlags = map[string][]string{ ClientCertKeyPath, specFlag, specVars, buildName, buildNumber, module, uploadExclusions, deb, uploadRecursive, uploadFlat, uploadRegexp, retries, retryWaitTime, dryRun, uploadExplode, symlinks, includeDirs, failNoOp, threads, uploadSyncDeletes, syncDeletesQuiet, InsecureTls, detailedSummary, Project, - uploadAnt, uploadArchive, uploadMinSplit, uploadSplitCount, + uploadAnt, uploadArchive, uploadMinSplit, uploadSplitCount, ChunkSize, }, Download: { url, user, password, accessToken, sshPassphrase, sshKeyPath, serverId, ClientCertPath, diff --git a/utils/cliutils/utils.go b/utils/cliutils/utils.go index 34d75281f..b9f50730f 100644 --- a/utils/cliutils/utils.go +++ b/utils/cliutils/utils.go @@ -279,6 +279,10 @@ func CreateUploadConfiguration(c *cli.Context) (uploadConfiguration *artifactory if err != nil { return nil, err } + uploadConfiguration.ChunkSizeMB, err = getUploadChunkSize(c, UploadChunkSizeMb) + if err != nil { + return nil, err + } uploadConfiguration.SplitCount, err = getSplitCount(c, UploadSplitCount, UploadMaxSplitCount) if err != nil { return nil, err @@ -767,6 +771,19 @@ func getMinSplit(c *cli.Context, defaultMinSplit int64) (minSplitSize int64, err return minSplitSize, nil } +func getUploadChunkSize(c *cli.Context, defaultChunkSize int64) (chunkSize int64, err error) { + chunkSize = defaultChunkSize + if c.String(ChunkSize) != "" { + chunkSize, err = strconv.ParseInt(c.String(ChunkSize), 10, 64) + if err != nil { + err = fmt.Errorf("the '--%s' option should have a numeric value. %s", ChunkSize, GetDocumentationMessage()) + return 0, err + } + } + + return chunkSize, nil +} + func getDebFlag(c *cli.Context) (deb string, err error) { deb = c.String("deb") slashesCount := strings.Count(deb, "/") - strings.Count(deb, "\\/") From b6c104e592c2c79434256a5ddd4a4a9b0aea5437 Mon Sep 17 00:00:00 2001 From: Robi Nino Date: Tue, 30 Apr 2024 16:36:33 +0300 Subject: [PATCH 2/8] Support tracing all requests by a command (#2518) --- go.mod | 2 +- go.sum | 4 ++-- main.go | 31 +++++++++++++++++++++++++++++++ main_test.go | 8 ++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 54758c390..1126734a5 100644 --- a/go.mod +++ b/go.mod @@ -139,7 +139,7 @@ require ( replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240424135031-dac0f92a2aae -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240424133643-5bf715f66eac +replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 // replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.0.6-0.20240408061620-c9b84da33d5e diff --git a/go.sum b/go.sum index 08c072ba9..97437b14d 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,8 @@ github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240424135031-dac0f92a2aae h1:Lgn3 github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240424135031-dac0f92a2aae/go.mod h1:/rNY4nIB8hIsL+MLGrZOgOYpY4QnJ+CHeTHPQDdGmOk= github.com/jfrog/jfrog-cli-security v1.1.0 h1:ifCjFJSa1D1pWyW/ADYPqnMkOddzkAT/WY4vHAufn1g= github.com/jfrog/jfrog-cli-security v1.1.0/go.mod h1:086t7e/einVAGfBXxRdEGDKovWt67I6SqUb1rcpdiZc= -github.com/jfrog/jfrog-client-go v1.28.1-0.20240424133643-5bf715f66eac h1:e/QfkFN/Qtkn1rBg/p7JCOMFLmE2EgfPBx57m2yIF1k= -github.com/jfrog/jfrog-client-go v1.28.1-0.20240424133643-5bf715f66eac/go.mod h1:FprEW0Sqhj6ZSFTFk9NCni+ovFAYMA3zCBmNX4hGXgQ= +github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 h1:cDTm4RxkI+RA8aNmdfM2BVxb5iCoXjLjhb+M+ReEIrE= +github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041/go.mod h1:FprEW0Sqhj6ZSFTFk9NCni+ovFAYMA3zCBmNX4hGXgQ= github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI= github.com/jszwec/csvutil v1.10.0/go.mod h1:/E4ONrmGkwmWsk9ae9jpXnv9QT8pLHEPcCirMFhxG9I= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= diff --git a/main.go b/main.go index 8482344cc..ac942afba 100644 --- a/main.go +++ b/main.go @@ -1,8 +1,12 @@ package main import ( + "crypto/rand" + "encoding/hex" "fmt" "github.com/jfrog/jfrog-cli/general/ai" + "github.com/jfrog/jfrog-client-go/http/httpclient" + "github.com/jfrog/jfrog-client-go/utils/errorutils" "os" "runtime" "sort" @@ -136,12 +140,39 @@ func execMain() error { if warningMessage != "" { clientlog.Warn(warningMessage) } + if err = setUberTraceIdToken(); err != nil { + clientlog.Warn("failed generating a trace ID token:", err.Error()) + } return nil } err = app.Run(args) return err } +// This command generates and sets an Uber Trace ID token which will be attached as a header to every request. +// This allows users to easily identify which logs on the server side are related to the command executed by the CLI. +func setUberTraceIdToken() error { + traceID, err := generateTraceIdToken() + if err != nil { + return err + } + httpclient.SetUberTraceIdToken(traceID) + clientlog.Debug("Trace ID for JFrog Platform logs: ", traceID) + return nil +} + +// Generates a 16 chars hexadecimal string to be used as a Trace ID token. +func generateTraceIdToken() (string, error) { + // Generate 8 random bytes. + buf := make([]byte, 8) + _, err := rand.Read(buf) + if err != nil { + return "", errorutils.CheckError(err) + } + // Convert the random bytes to a 16 chars hexadecimal string. + return hex.EncodeToString(buf), nil +} + // Detects typos and can identify one or more valid commands similar to the error command. // In Addition, if a subcommand is found with exact match, preferred it over similar commands, for example: // "jf bp" -> return "jf rt bp" diff --git a/main_test.go b/main_test.go index f0f8859a8..fa593db57 100644 --- a/main_test.go +++ b/main_test.go @@ -355,3 +355,11 @@ func TestIntro(t *testing.T) { runJfrogCli(t, "intro") assert.Contains(t, buffer.String(), "Thank you for installing version") } + +func TestGenerateAndLogTraceIdToken(t *testing.T) { + traceIdToken, err := generateTraceIdToken() + assert.NoError(t, err) + assert.Len(t, traceIdToken, 16) + _, err = strconv.ParseUint(traceIdToken, 16, 64) + assert.NoError(t, err, "unexpected: trace ID token contains non-hex characters") +} From bf350dc1abd882986ea35d2128d27ad5eb433a19 Mon Sep 17 00:00:00 2001 From: Robi Nino Date: Thu, 2 May 2024 18:21:30 +0300 Subject: [PATCH 3/8] Add npm distribution tags test (#2513) --- go.mod | 4 ++-- go.sum | 8 ++++---- npm_test.go | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 1126734a5..1d9410446 100644 --- a/go.mod +++ b/go.mod @@ -124,7 +124,7 @@ require ( go.uber.org/multierr v1.9.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.22.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect @@ -137,7 +137,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.20240424135031-dac0f92a2aae +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240502151649-934fb7391b5c replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 diff --git a/go.sum b/go.sum index 97437b14d..f29029ece 100644 --- a/go.sum +++ b/go.sum @@ -135,8 +135,8 @@ github.com/jfrog/gofrog v1.7.1 h1:ME1Meg4hukAT/7X6HUQCVSe4DNjMZACCP8aCY37EW/w= github.com/jfrog/gofrog v1.7.1/go.mod h1:X7bjfWoQDN0Z4FQGbE91j3gbPP7Urwzm4Z8tkvrlbRI= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240424135031-dac0f92a2aae h1:Lgn3WxoSc4YwhitPF2sPlqVviDZ4WRMI8eLOQqV9GZs= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240424135031-dac0f92a2aae/go.mod h1:/rNY4nIB8hIsL+MLGrZOgOYpY4QnJ+CHeTHPQDdGmOk= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240502151649-934fb7391b5c h1:7pvL4q0Mo3i7b7/r8+FriL/j2JwI6AIDn5QTfCKvLSk= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240502151649-934fb7391b5c/go.mod h1:S0hIZcojq4GehyOOSt0o9x4fExWFtamwfFc7bfIWW+4= github.com/jfrog/jfrog-cli-security v1.1.0 h1:ifCjFJSa1D1pWyW/ADYPqnMkOddzkAT/WY4vHAufn1g= github.com/jfrog/jfrog-cli-security v1.1.0/go.mod h1:086t7e/einVAGfBXxRdEGDKovWt67I6SqUb1rcpdiZc= github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 h1:cDTm4RxkI+RA8aNmdfM2BVxb5iCoXjLjhb+M+ReEIrE= @@ -335,8 +335,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/npm_test.go b/npm_test.go index ba9a72a0a..71f170421 100644 --- a/npm_test.go +++ b/npm_test.go @@ -2,6 +2,8 @@ package main import ( "fmt" + "github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/generic" + "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils" "os" "os/exec" "path/filepath" @@ -460,6 +462,48 @@ func TestNpmPublishDetailedSummary(t *testing.T) { assert.Equal(t, 64, len(files[0].Sha256), "Summary validation failed - sha256 should be in size 64 digits.") } +func TestNpmDistTag(t *testing.T) { + initNpmTest(t) + defer cleanNpmTest(t) + wd, err := os.Getwd() + assert.NoError(t, err, "Failed to get current dir") + npmPath := initNpmProjectTest(t) + chdirCallBack := clientTestUtils.ChangeDirWithCallback(t, wd, npmPath) + defer chdirCallBack() + + jfrogCli := coretests.NewJfrogCli(execMain, "jfrog", "") + + // Publish package with tag. + tagP := "tag-from-publish" + assert.NoError(t, jfrogCli.Exec("npm", "p", "--tag="+tagP)) + + // Add tag using dist-tag add command. + tagDt := "tag-from-dist-tag" + assert.NoError(t, jfrogCli.Exec("npm", "dist-tag", "add", "jfrog-cli-tests@v1.0.0", tagDt)) + + assertDistTagsExist(t, []string{tagP, tagDt, "latest"}) +} + +func assertDistTagsExist(t *testing.T, expectedTags []string) { + searchSpecBuilder := spec.NewBuilder().Pattern(tests.NpmRepo + "/*jfrog-cli-tests*1.0.0.tgz").Recursive(true) + searchCmd := generic.NewSearchCommand() + searchCmd.SetServerDetails(serverDetails) + searchCmd.SetSpec(searchSpecBuilder.BuildSpec()) + + reader, err := searchCmd.Search() + assert.NoError(t, err) + readerGetErrorAndAssert(t, reader) + defer readerCloseAndAssert(t, reader) + length, err := reader.Length() + assert.NoError(t, err) + if !assert.Equal(t, length, 1) { + return + } + for resultItem := new(utils.SearchResult); reader.NextRecord(resultItem) == nil; resultItem = new(utils.SearchResult) { + assert.ElementsMatch(t, resultItem.Props[npm.DistTagPropKey], expectedTags) + } +} + func TestNpmPublishWithDeploymentView(t *testing.T) { initNpmTest(t) defer cleanNpmTest(t) From 26635aeac442ea976c38b5a3eae03fad489a715a Mon Sep 17 00:00:00 2001 From: Robi Nino Date: Sun, 5 May 2024 17:00:00 +0300 Subject: [PATCH 4/8] Fix refresh tokens tests (#2530) --- access_test.go | 19 +++++++++++++------ artifactory_test.go | 33 +++++++++++++++++++-------------- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/access_test.go b/access_test.go index 8374c5b65..226325ced 100644 --- a/access_test.go +++ b/access_test.go @@ -121,12 +121,13 @@ func TestRefreshableAccessTokens(t *testing.T) { if !assert.NoError(t, err) { return } - curAccessToken, curRefreshToken, err := getAccessTokensFromConfig(t, tests.ServerId) + curAccessToken, curRefreshToken, curArtifactoryRefreshToken, err := getTokensFromConfig(t) if !assert.NoError(t, err) { return } assert.NotEmpty(t, curAccessToken) assert.NotEmpty(t, curRefreshToken) + assert.Empty(t, curArtifactoryRefreshToken) // Make the token always refresh. auth.RefreshPlatformTokenBeforeExpiryMinutes = 365 * 24 * 60 @@ -137,7 +138,7 @@ func TestRefreshableAccessTokens(t *testing.T) { if !assert.NoError(t, err) { return } - curAccessToken, curRefreshToken, err = assertTokensChanged(t, curAccessToken, curRefreshToken) + curAccessToken, curRefreshToken, err = assertAccessTokensChanged(t, curAccessToken, curRefreshToken) if !assert.NoError(t, err) { return } @@ -149,24 +150,30 @@ func TestRefreshableAccessTokens(t *testing.T) { if !assert.NoError(t, err) { return } - newAccessToken, newRefreshToken, err := getArtifactoryTokensFromConfig(t) + newAccessToken, newRefreshToken, newArtifactoryRefreshToken, err := getTokensFromConfig(t) if !assert.NoError(t, err) { return } assert.Equal(t, curAccessToken, newAccessToken) assert.Equal(t, curRefreshToken, newRefreshToken) + assert.Empty(t, newArtifactoryRefreshToken) // Cleanup cleanArtifactoryTest() } -func getAccessTokensFromConfig(t *testing.T, serverId string) (accessToken, refreshToken string, err error) { - details, err := config.GetSpecificConfig(serverId, false, false) +// After refreshing an access token, assert that the access token and the refresh token were changed, and the Artifactory refresh token remained empty. +func assertAccessTokensChanged(t *testing.T, curAccessToken, curRefreshToken string) (newAccessToken, newRefreshToken string, err error) { + var newArtifactoryRefreshToken string + newAccessToken, newRefreshToken, newArtifactoryRefreshToken, err = getTokensFromConfig(t) if err != nil { assert.NoError(t, err) return "", "", err } - return details.AccessToken, details.RefreshToken, nil + assert.NotEqual(t, curAccessToken, newAccessToken) + assert.NotEqual(t, curRefreshToken, newRefreshToken) + assert.Empty(t, newArtifactoryRefreshToken) + return newAccessToken, newRefreshToken, nil } const ( diff --git a/artifactory_test.go b/artifactory_test.go index e0460d2da..df72662ee 100644 --- a/artifactory_test.go +++ b/artifactory_test.go @@ -5343,12 +5343,13 @@ func TestRefreshableArtifactoryTokens(t *testing.T) { if err != nil { return } - curAccessToken, curRefreshToken, err := getArtifactoryTokensFromConfig(t) + curAccessToken, curRefreshToken, curArtifactoryRefreshToken, err := getTokensFromConfig(t) if err != nil { return } assert.NotEmpty(t, curAccessToken) - assert.NotEmpty(t, curRefreshToken) + assert.NotEmpty(t, curArtifactoryRefreshToken) + assert.Empty(t, curRefreshToken) // Make the token always refresh. auth.RefreshArtifactoryTokenBeforeExpiryMinutes = 60 @@ -5359,7 +5360,7 @@ func TestRefreshableArtifactoryTokens(t *testing.T) { if err != nil { return } - curAccessToken, curRefreshToken, err = assertTokensChanged(t, curAccessToken, curRefreshToken) + curAccessToken, curArtifactoryRefreshToken, err = assertArtifactoryTokensChanged(t, curAccessToken, curArtifactoryRefreshToken) if err != nil { return } @@ -5374,7 +5375,7 @@ func TestRefreshableArtifactoryTokens(t *testing.T) { if err != nil { return } - curAccessToken, curRefreshToken, err = assertTokensChanged(t, curAccessToken, curRefreshToken) + curAccessToken, curArtifactoryRefreshToken, err = assertArtifactoryTokensChanged(t, curAccessToken, curArtifactoryRefreshToken) if err != nil { return } @@ -5389,7 +5390,7 @@ func TestRefreshableArtifactoryTokens(t *testing.T) { if err != nil { return } - curAccessToken, curRefreshToken, err = assertTokensChanged(t, curAccessToken, curRefreshToken) + curAccessToken, curArtifactoryRefreshToken, err = assertArtifactoryTokensChanged(t, curAccessToken, curArtifactoryRefreshToken) if err != nil { return } @@ -5401,12 +5402,13 @@ func TestRefreshableArtifactoryTokens(t *testing.T) { if err != nil { return } - newAccessToken, newRefreshToken, err := getArtifactoryTokensFromConfig(t) + newAccessToken, newRefreshToken, newArtifactoryRefreshToken, err := getTokensFromConfig(t) if err != nil { return } assert.Equal(t, curAccessToken, newAccessToken) - assert.Equal(t, curRefreshToken, newRefreshToken) + assert.Equal(t, curArtifactoryRefreshToken, newArtifactoryRefreshToken) + assert.Empty(t, newRefreshToken) // Cleanup cleanArtifactoryTest() @@ -5442,24 +5444,27 @@ func setPasswordInConfig(t *testing.T, serverId, password string) error { return nil } -func getArtifactoryTokensFromConfig(t *testing.T) (accessToken, refreshToken string, err error) { +func getTokensFromConfig(t *testing.T) (accessToken, refreshToken, artifactoryRefreshToken string, err error) { details, err := config.GetSpecificConfig(tests.ServerId, false, false) if err != nil { assert.NoError(t, err) - return "", "", err + return "", "", "", err } - return details.AccessToken, details.ArtifactoryRefreshToken, nil + return details.AccessToken, details.RefreshToken, details.ArtifactoryRefreshToken, nil } -func assertTokensChanged(t *testing.T, curAccessToken, curRefreshToken string) (newAccessToken, newRefreshToken string, err error) { - newAccessToken, newRefreshToken, err = getArtifactoryTokensFromConfig(t) +// After refreshing an Artifactory access token, assert that the access token and the artifactory refresh token were changed, and refresh token remained empty. +func assertArtifactoryTokensChanged(t *testing.T, curAccessToken, curArtifactoryRefreshToken string) (newAccessToken, newArtifactoryRefreshToken string, err error) { + var newRefreshToken string + newAccessToken, newRefreshToken, newArtifactoryRefreshToken, err = getTokensFromConfig(t) if err != nil { assert.NoError(t, err) return "", "", err } assert.NotEqual(t, curAccessToken, newAccessToken) - assert.NotEqual(t, curRefreshToken, newRefreshToken) - return newAccessToken, newRefreshToken, nil + assert.NotEqual(t, curArtifactoryRefreshToken, newArtifactoryRefreshToken) + assert.Empty(t, newRefreshToken) + return newAccessToken, newArtifactoryRefreshToken, nil } func uploadWithSpecificServerAndVerify(t *testing.T, cli *coretests.JfrogCli, source string, expectedResults int) error { diff --git a/go.mod b/go.mod index 1d9410446..350e89bd7 100644 --- a/go.mod +++ b/go.mod @@ -137,7 +137,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.20240502151649-934fb7391b5c +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505135056-aa682847c303 replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 diff --git a/go.sum b/go.sum index f29029ece..9179a04c0 100644 --- a/go.sum +++ b/go.sum @@ -135,8 +135,8 @@ github.com/jfrog/gofrog v1.7.1 h1:ME1Meg4hukAT/7X6HUQCVSe4DNjMZACCP8aCY37EW/w= github.com/jfrog/gofrog v1.7.1/go.mod h1:X7bjfWoQDN0Z4FQGbE91j3gbPP7Urwzm4Z8tkvrlbRI= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240502151649-934fb7391b5c h1:7pvL4q0Mo3i7b7/r8+FriL/j2JwI6AIDn5QTfCKvLSk= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240502151649-934fb7391b5c/go.mod h1:S0hIZcojq4GehyOOSt0o9x4fExWFtamwfFc7bfIWW+4= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505135056-aa682847c303 h1:UARvAZKTfwmbcNX6g2SS9hCs/rp/YwK+UJe6BNm8zKA= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505135056-aa682847c303/go.mod h1:S0hIZcojq4GehyOOSt0o9x4fExWFtamwfFc7bfIWW+4= github.com/jfrog/jfrog-cli-security v1.1.0 h1:ifCjFJSa1D1pWyW/ADYPqnMkOddzkAT/WY4vHAufn1g= github.com/jfrog/jfrog-cli-security v1.1.0/go.mod h1:086t7e/einVAGfBXxRdEGDKovWt67I6SqUb1rcpdiZc= github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 h1:cDTm4RxkI+RA8aNmdfM2BVxb5iCoXjLjhb+M+ReEIrE= From b17e679f36904cf9fd120bf573e72844060484bd Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Mon, 6 May 2024 13:44:23 +0300 Subject: [PATCH 5/8] Improve help sections, add details to command descriptions and hide redundant commands (#2525) --- docs/artifactory/buildaddgit/help.go | 6 +- docs/artifactory/copy/help.go | 6 +- docs/artifactory/delete/help.go | 2 +- docs/artifactory/deleteprops/help.go | 11 ++-- docs/artifactory/download/help.go | 2 +- docs/artifactory/groupaddusers/help.go | 2 +- docs/artifactory/move/help.go | 2 +- docs/artifactory/podmanpull/help.go | 4 +- docs/artifactory/search/help.go | 2 +- docs/artifactory/setprops/help.go | 10 +-- docs/artifactory/upload/help.go | 2 +- docs/artifactory/usersdelete/help.go | 2 +- docs/common/env.go | 2 +- docs/general/invite/help.go | 7 -- general/project/cli.go | 1 + go.mod | 42 ++++++------ go.sum | 88 +++++++++++++------------- main.go | 21 ++---- utils/cliutils/commandsflags.go | 80 +++++++++++------------ 19 files changed, 140 insertions(+), 152 deletions(-) delete mode 100644 docs/general/invite/help.go diff --git a/docs/artifactory/buildaddgit/help.go b/docs/artifactory/buildaddgit/help.go index 63fe99311..d3d6b73d1 100644 --- a/docs/artifactory/buildaddgit/help.go +++ b/docs/artifactory/buildaddgit/help.go @@ -3,7 +3,11 @@ package buildaddgit var Usage = []string{"rt bag [command options] [Path To .git]"} func GetDescription() string { - return "Collect VCS details from git and add them to a build." + return "Collects the Git revision and URL from the local .git directory and adds it to the build-info.\n" + + "It can also collect the list of tracked project issues (for example, issues stored in JIRA or other bug tracking systems) and add them to the build-info.\n" + + "The issues are collected by reading the git commit messages from the local git log.\n" + + "Each commit message is matched against a pre-configured regular expression, which retrieves the issue ID and issue summary.\n" + + "The information required for collecting the issues is retrieved from a yaml configuration file provided to the command." } func GetArguments() string { diff --git a/docs/artifactory/copy/help.go b/docs/artifactory/copy/help.go index 9303ab6d6..15706d3cc 100644 --- a/docs/artifactory/copy/help.go +++ b/docs/artifactory/copy/help.go @@ -8,15 +8,15 @@ var Usage = []string{"rt cp [command options] " const EnvVar string = common.JfrogCliFailNoOp func GetDescription() string { - return "Copy files." + return "Copy files between Artifactory paths." } func GetArguments() string { - return ` source Pattern + return ` source pattern Specifies the source path in Artifactory, from which the artifacts should be copied, in the following format: /. You can use wildcards to specify multiple artifacts. - target Pattern + target pattern Specifies the target path in Artifactory, to which the artifacts should be copied, in the following format: /. If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be copied. diff --git a/docs/artifactory/delete/help.go b/docs/artifactory/delete/help.go index 290cd067f..28ea15baf 100644 --- a/docs/artifactory/delete/help.go +++ b/docs/artifactory/delete/help.go @@ -8,7 +8,7 @@ var Usage = []string{"rt del [command options] ", const EnvVar string = common.JfrogCliFailNoOp func GetDescription() string { - return "Delete files." + return "Delete files from Artifactory." } func GetArguments() string { diff --git a/docs/artifactory/deleteprops/help.go b/docs/artifactory/deleteprops/help.go index 7219886ec..092a5a267 100644 --- a/docs/artifactory/deleteprops/help.go +++ b/docs/artifactory/deleteprops/help.go @@ -2,8 +2,8 @@ package deleteprops import "github.com/jfrog/jfrog-cli/docs/common" -var Usage = []string{"rt delp [command options] ", - "rt delp --spec= [command options]"} +var Usage = []string{"rt delp [command options] ", + "rt delp --spec= [command options]"} const EnvVar string = common.JfrogCliFailNoOp @@ -12,9 +12,10 @@ func GetDescription() string { } func GetArguments() string { - return ` artifacts pattern + return ` files pattern Properties of artifacts that match this pattern will be removed. + in the following format: /. You can use wildcards to specify multiple artifacts. - artifact properties - The list of properties, in the form of key1,key2,..., to be removed from the matching artifacts.` + properties list + List of comma-separated(,) properties, in the form of key1,key2,..., to be removed from the matching files.` } diff --git a/docs/artifactory/download/help.go b/docs/artifactory/download/help.go index 09834c491..e1965c2c6 100644 --- a/docs/artifactory/download/help.go +++ b/docs/artifactory/download/help.go @@ -8,7 +8,7 @@ var Usage = []string{"rt dl [command options] [target pattern]" var EnvVar = []string{common.JfrogCliTransitiveDownloadExperimental, common.JfrogCliFailNoOp} func GetDescription() string { - return "Download files." + return "Download files from Artifactory to local file system." } func GetArguments() string { diff --git a/docs/artifactory/groupaddusers/help.go b/docs/artifactory/groupaddusers/help.go index da389b883..48a59cf0d 100644 --- a/docs/artifactory/groupaddusers/help.go +++ b/docs/artifactory/groupaddusers/help.go @@ -12,6 +12,6 @@ func GetArguments() string { users list Specifies the usernames to add to the specified group. - The list should be comma-separated. + The list should be comma-separated(,) in the form of user1,user2,... ` } diff --git a/docs/artifactory/move/help.go b/docs/artifactory/move/help.go index 9eb29066f..207ad5bb3 100644 --- a/docs/artifactory/move/help.go +++ b/docs/artifactory/move/help.go @@ -8,7 +8,7 @@ var Usage = []string{"rt mv [command options] " var EnvVar = common.JfrogCliFailNoOp func GetDescription() string { - return "Move files." + return "Move files between Artifactory paths." } func GetArguments() string { diff --git a/docs/artifactory/podmanpull/help.go b/docs/artifactory/podmanpull/help.go index 56e6e0082..442d5341f 100644 --- a/docs/artifactory/podmanpull/help.go +++ b/docs/artifactory/podmanpull/help.go @@ -1,6 +1,6 @@ package podmanpull -var Usage = []string{"rt podman-pull "} +var Usage = []string{"rt podman-pull "} func GetDescription() string { return "Podman pull." @@ -9,7 +9,7 @@ func GetDescription() string { func GetArguments() string { return ` image tag Docker image tag to pull. - target repo + source repo Source repository in Artifactory. ` } diff --git a/docs/artifactory/search/help.go b/docs/artifactory/search/help.go index b355fe5e0..66de9a10a 100644 --- a/docs/artifactory/search/help.go +++ b/docs/artifactory/search/help.go @@ -8,7 +8,7 @@ var Usage = []string{"rt s [command options] ", const EnvVar string = common.JfrogCliFailNoOp func GetDescription() string { - return "Search files." + return "Search files in Artifactory." } func GetArguments() string { diff --git a/docs/artifactory/setprops/help.go b/docs/artifactory/setprops/help.go index 78e58accd..a403a3082 100644 --- a/docs/artifactory/setprops/help.go +++ b/docs/artifactory/setprops/help.go @@ -2,8 +2,8 @@ package setprops import "github.com/jfrog/jfrog-cli/docs/common" -var Usage = []string{"rt sp [command options] ", - "rt sp --spec= [command options]"} +var Usage = []string{"rt sp [command options] ", + "rt sp --spec= [command options]"} const EnvVar string = common.JfrogCliFailNoOp @@ -12,9 +12,9 @@ func GetDescription() string { } func GetArguments() string { - return ` artifacts pattern + return ` files pattern Artifacts that match the pattern will be set with the specified properties. - artifact properties - The list of properties, in the form of key1=value1;key2=value2,..., to be set on the matching artifacts.` + file properties + List of semicolon-separated(;) key-value properties, in the form of "key1=value1;key2=value2;..." to be set on the matching artifacts.` } diff --git a/docs/artifactory/upload/help.go b/docs/artifactory/upload/help.go index 32be5afcb..0166f9811 100644 --- a/docs/artifactory/upload/help.go +++ b/docs/artifactory/upload/help.go @@ -8,7 +8,7 @@ var Usage = []string{"rt u [command options] ", var EnvVar = []string{common.JfrogCliMinChecksumDeploySizeKb, common.JfrogCliFailNoOp, common.JfrogCliUploadEmptyArchive} func GetDescription() string { - return "Upload files." + return "Upload files from local file system to Artifactory." } func GetArguments() string { diff --git a/docs/artifactory/usersdelete/help.go b/docs/artifactory/usersdelete/help.go index 7754c43c9..1a8f01692 100644 --- a/docs/artifactory/usersdelete/help.go +++ b/docs/artifactory/usersdelete/help.go @@ -8,5 +8,5 @@ func GetDescription() string { func GetArguments() string { return ` users list - Comma-separated list of usernames to delete.` + Comma-separated(,) list of usernames to delete in the form of user1,user2,....` } diff --git a/docs/common/env.go b/docs/common/env.go index 9a4a3fd13..141f5a5c7 100644 --- a/docs/common/env.go +++ b/docs/common/env.go @@ -101,7 +101,7 @@ var ( JfrogCliEnvExclude = ` JFROG_CLI_ENV_EXCLUDE [Default: *password*;*psw*;*secret*;*key*;*token*;*auth*] - List of case insensitive patterns in the form of "value1;value2;...". + List of case insensitive semicolon-separated(;) patterns in the form of "value1;value2;...". Environment variables match those patterns will be excluded. This environment variable is used by the "` + coreutils.GetCliExecutableName() + ` rt build-publish" command, in case the --env-exclude command option is not sent.` diff --git a/docs/general/invite/help.go b/docs/general/invite/help.go deleted file mode 100644 index d581dc56b..000000000 --- a/docs/general/invite/help.go +++ /dev/null @@ -1,7 +0,0 @@ -package invite - -var Usage = []string{"invite "} - -func GetDescription() string { - return "Invite someone to join the JFrog environment by sending him an email." -} diff --git a/general/project/cli.go b/general/project/cli.go index f1a3dd758..27a2bc54a 100644 --- a/general/project/cli.go +++ b/general/project/cli.go @@ -19,6 +19,7 @@ func GetCommands() []cli.Command { return cliutils.GetSortedCommands(cli.CommandsByName{ { Name: "init", + Hidden: true, Usage: projectinit.GetDescription(), Flags: cliutils.GetCommandFlags(cliutils.InitProject), HelpName: corecommon.CreateUsage("project init", projectinit.GetDescription(), projectinit.Usage), diff --git a/go.mod b/go.mod index 350e89bd7..1fac44d15 100644 --- a/go.mod +++ b/go.mod @@ -16,10 +16,10 @@ require ( github.com/jszwec/csvutil v1.10.0 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.23.0 - github.com/urfave/cli v1.22.14 + github.com/urfave/cli v1.22.15 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 - golang.org/x/term v0.18.0 + golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f + golang.org/x/term v0.20.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -38,10 +38,10 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/containerd/containerd v1.7.12 // indirect + github.com/containerd/containerd v1.7.15 // indirect github.com/containerd/log v0.1.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/distribution/reference v0.5.0 // indirect @@ -50,23 +50,23 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/forPelevin/gomoji v1.2.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gookit/color v1.5.4 // 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.6 // indirect + github.com/jedib0t/go-pretty/v6 v6.5.8 // indirect github.com/jfrog/jfrog-apps-config v1.0.1 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.17.4 // indirect @@ -116,19 +116,19 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.19.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.20.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.33.0 // indirect @@ -137,7 +137,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.20240505135056-aa682847c303 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7 replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 diff --git a/go.sum b/go.sum index 9179a04c0..70d429260 100644 --- a/go.sum +++ b/go.sum @@ -47,14 +47,14 @@ github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38 github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= -github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= +github.com/containerd/containerd v1.7.15 h1:afEHXdil9iAm03BmhjzKyXnnEBtjaLJefdU7DV0IFes= +github.com/containerd/containerd v1.7.15/go.mod h1:ISzRRTMF8EXNpJlTzyr2XMhN+j9K302C21/+cr3kUnY= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= @@ -78,8 +78,8 @@ github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdf github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/forPelevin/gomoji v1.2.0 h1:9k4WVSSkE1ARO/BWywxgEUBvR/jMnao6EZzrql5nxJ8= github.com/forPelevin/gomoji v1.2.0/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -94,8 +94,8 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/gocarina/gocsv v0.0.0-20231116093920-b87c2d0e983a h1:RYfmiM0zluBJOiPDJseKLEN4BapJ42uSi9SZBQ2YyiA= @@ -108,9 +108,8 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -125,8 +124,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.6 h1:nKXVLqPfAwY7sWcYXdNZZZ2fjqDpAtj9UeWupgfUxSg= -github.com/jedib0t/go-pretty/v6 v6.5.6/go.mod h1:5LQIxa52oJ/DlDSLv0HEkWOFMDGoWkJb9ss5KqPpJBg= +github.com/jedib0t/go-pretty/v6 v6.5.8 h1:8BCzJdSvUbaDuRba4YVh+SKMGcAAKdkcF3SVFbrHAtQ= +github.com/jedib0t/go-pretty/v6 v6.5.8/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E= github.com/jfrog/archiver/v3 v3.6.0 h1:OVZ50vudkIQmKMgA8mmFF9S0gA47lcag22N13iV3F1w= github.com/jfrog/archiver/v3 v3.6.0/go.mod h1:fCAof46C3rAXgZurS8kNRNdSVMKBbZs+bNNhPYxLldI= github.com/jfrog/build-info-go v1.9.26 h1:1Ddc6+Ecvhc+UMnKhRVG1jGM6fYNwA49207azTBGBc8= @@ -135,8 +134,8 @@ github.com/jfrog/gofrog v1.7.1 h1:ME1Meg4hukAT/7X6HUQCVSe4DNjMZACCP8aCY37EW/w= github.com/jfrog/gofrog v1.7.1/go.mod h1:X7bjfWoQDN0Z4FQGbE91j3gbPP7Urwzm4Z8tkvrlbRI= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505135056-aa682847c303 h1:UARvAZKTfwmbcNX6g2SS9hCs/rp/YwK+UJe6BNm8zKA= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505135056-aa682847c303/go.mod h1:S0hIZcojq4GehyOOSt0o9x4fExWFtamwfFc7bfIWW+4= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7 h1:C2ZlXINWp0m2H22hXa5LTjEh2xY86Cj/VFrbHHPt2O4= +github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7/go.mod h1:2tdqY2OG3Cv5xQX4LhKM6VsJLp+TLK3Dq7DXHcqFVkg= github.com/jfrog/jfrog-cli-security v1.1.0 h1:ifCjFJSa1D1pWyW/ADYPqnMkOddzkAT/WY4vHAufn1g= github.com/jfrog/jfrog-cli-security v1.1.0/go.mod h1:086t7e/einVAGfBXxRdEGDKovWt67I6SqUb1rcpdiZc= github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 h1:cDTm4RxkI+RA8aNmdfM2BVxb5iCoXjLjhb+M+ReEIrE= @@ -250,6 +249,7 @@ github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMV 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= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -267,8 +267,8 @@ github.com/testcontainers/testcontainers-go v0.23.0/go.mod h1:3gzuZfb7T9qfcH2pHp github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= -github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= +github.com/urfave/cli v1.22.15 h1:nuqt+pdC/KqswQKhETJjo7pvn/k4xMUxgW6liI7XpnM= +github.com/urfave/cli v1.22.15/go.mod h1:wSan1hmo5zeyLGBjRJbzRTNk8gwoYa2B9n4q9dmRIc0= github.com/vbauerster/mpb/v7 v7.5.3 h1:BkGfmb6nMrrBQDFECR/Q7RkKCw7ylMetCb4079CGs4w= github.com/vbauerster/mpb/v7 v7.5.3/go.mod h1:i+h4QY6lmLvBNK2ah1fSreiw3ajskRlBp9AhY/PnuOE= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= @@ -290,17 +290,17 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -313,16 +313,16 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= -golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -335,15 +335,15 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -373,15 +373,15 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -391,8 +391,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -400,8 +400,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -413,8 +413,6 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1: google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/main.go b/main.go index ac942afba..da03f8554 100644 --- a/main.go +++ b/main.go @@ -214,19 +214,19 @@ func getCommands() ([]cli.Command, error) { cliNameSpaces := []cli.Command{ { Name: cliutils.CmdArtifactory, - Usage: "Artifactory commands.", + Usage: "JFrog Artifactory commands.", Subcommands: artifactory.GetCommands(), Category: otherCategory, }, { Name: cliutils.CmdMissionControl, - Usage: "Mission Control commands.", + Usage: "JFrog Mission Control commands.", Subcommands: missioncontrol.GetCommands(), Category: otherCategory, }, { Name: cliutils.CmdDistribution, - Usage: "Distribution commands.", + Usage: "JFrog Distribution V1 commands.", Subcommands: distribution.GetCommands(), Category: otherCategory, }, @@ -251,18 +251,20 @@ func getCommands() ([]cli.Command, error) { { Name: cliutils.CmdConfig, Aliases: []string{"c"}, - Usage: "Config commands.", + Usage: "Config server configurations commands.", Subcommands: config.GetCommands(), Category: otherCategory, }, { Name: cliutils.CmdProject, + Hidden: true, Usage: "Project commands.", Subcommands: project.GetCommands(), Category: otherCategory, }, { Name: "ci-setup", + Hidden: true, Usage: cisetup.GetDescription(), HelpName: corecommon.CreateUsage("ci-setup", cisetup.GetDescription(), cisetup.Usage), ArgsUsage: common.CreateEnvVars(), @@ -272,17 +274,6 @@ func getCommands() ([]cli.Command, error) { return cisetupcommand.RunCiSetupCmd() }, }, - // { - // Name: "invite", - // Usage: invite.GetDescription(), - // HelpName: corecommon.CreateUsage("invite", invite.GetDescription(), invite.Usage), - // ArgsUsage: common.CreateEnvVars(), - // BashComplete: corecommon.CreateBashCompletionFunc(), - // Category: otherCategory, - // Action: func(c *cli.Context) error { - // return invitecommand.RunInviteCmd(c) - // }, - // }, { Name: "setup", HideHelp: true, diff --git a/utils/cliutils/commandsflags.go b/utils/cliutils/commandsflags.go index 8a6a89c05..dc76fba98 100644 --- a/utils/cliutils/commandsflags.go +++ b/utils/cliutils/commandsflags.go @@ -641,7 +641,7 @@ var flagsMap = map[string]cli.Flag{ }, sortBy: cli.StringFlag{ Name: sortBy, - Usage: fmt.Sprintf("[Optional] A list of semicolon-separated fields to sort by. The fields must be part of the 'items' AQL domain. For more information, see %sjfrog-artifactory-documentation/artifactory-query-language` `", coreutils.JFrogHelpUrl), + Usage: fmt.Sprintf("[Optional] List of semicolon-separated(;) fields to sort by. The fields must be part of the 'items' AQL domain. For more information, see %sjfrog-artifactory-documentation/artifactory-query-language` `", coreutils.JFrogHelpUrl), }, sortOrder: cli.StringFlag{ Name: sortOrder, @@ -661,7 +661,7 @@ var flagsMap = map[string]cli.Flag{ }, specVars: cli.StringFlag{ Name: specVars, - Usage: "[Optional] List of variables in the form of \"key1=value1;key2=value2;...\" (wrapped by quotes) to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.` `", + Usage: "[Optional] List of semicolon-separated(;) variables in the form of \"key1=value1;key2=value2;...\" (wrapped by quotes) to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.` `", }, buildName: cli.StringFlag{ Name: buildName, @@ -677,11 +677,11 @@ var flagsMap = map[string]cli.Flag{ }, exclusions: cli.StringFlag{ Name: exclusions, - Usage: "[Optional] Semicolon-separated list of exclusions. Exclusions can include the * and the ? wildcards.` `", + Usage: "[Optional] List of semicolon-separated(;) exclusions. Exclusions can include the * and the ? wildcards.` `", }, uploadExclusions: cli.StringFlag{ Name: exclusions, - Usage: "[Optional] Semicolon-separated list of exclude patterns. Exclude patterns may contain the * and the ? wildcards or a regex pattern, according to the value of the 'regexp' option.` `", + Usage: "[Optional] List of semicolon-separated(;) exclude patterns. Exclude patterns may contain the * and the ? wildcards or a regex pattern, according to the value of the 'regexp' option.` `", }, build: cli.StringFlag{ Name: build, @@ -714,7 +714,7 @@ var flagsMap = map[string]cli.Flag{ }, retryWaitTime: cli.StringFlag{ Name: retryWaitTime, - Usage: "[Default: 0] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.` `", + Usage: "[Default: 0] Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).` `", }, InsecureTls: cli.BoolFlag{ Name: InsecureTls, @@ -788,7 +788,7 @@ var flagsMap = map[string]cli.Flag{ }, uploadTargetProps: cli.StringFlag{ Name: targetProps, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Those properties will be attached to the uploaded artifacts.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Those properties will be attached to the uploaded artifacts.` `", }, uploadSyncDeletes: cli.StringFlag{ Name: syncDeletes, @@ -796,7 +796,7 @@ var flagsMap = map[string]cli.Flag{ }, uploadArchive: cli.StringFlag{ Name: archive, - Usage: "[Optional] Set to \"zip\" to deploy the files to Artifactory in a ZIP archive.` `", + Usage: "[Optional] Set to \"zip\" to pack and deploy the files to Artifactory inside a ZIP archive. Currently, the only packaging format supported is zip.` `", }, uploadMinSplit: cli.StringFlag{ Name: MinSplit, @@ -850,11 +850,11 @@ var flagsMap = map[string]cli.Flag{ }, downloadProps: cli.StringFlag{ Name: props, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts with these properties will be downloaded.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts with these properties will be downloaded.` `", }, downloadExcludeProps: cli.StringFlag{ Name: excludeProps, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts without the specified properties will be downloaded.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts without the specified properties will be downloaded.` `", }, downloadSyncDeletes: cli.StringFlag{ Name: syncDeletes, @@ -870,11 +870,11 @@ var flagsMap = map[string]cli.Flag{ }, moveProps: cli.StringFlag{ Name: props, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts with these properties will be moved.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts with these properties will be moved.` `", }, moveExcludeProps: cli.StringFlag{ Name: excludeProps, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts without the specified properties will be moved.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts without the specified properties will be moved.` `", }, copyRecursive: cli.BoolTFlag{ Name: recursive, @@ -886,11 +886,11 @@ var flagsMap = map[string]cli.Flag{ }, copyProps: cli.StringFlag{ Name: props, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts with these properties will be copied.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts with these properties will be copied.` `", }, copyExcludeProps: cli.StringFlag{ Name: excludeProps, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts without the specified properties will be copied.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts without the specified properties will be copied.` `", }, deleteRecursive: cli.BoolTFlag{ Name: recursive, @@ -898,11 +898,11 @@ var flagsMap = map[string]cli.Flag{ }, deleteProps: cli.StringFlag{ Name: props, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts with these properties will be deleted.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts with these properties will be deleted.` `", }, deleteExcludeProps: cli.StringFlag{ Name: excludeProps, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts without the specified properties will be deleted.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts without the specified properties will be deleted.` `", }, deleteQuiet: cli.BoolFlag{ Name: quiet, @@ -918,11 +918,11 @@ var flagsMap = map[string]cli.Flag{ }, searchProps: cli.StringFlag{ Name: props, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts with these properties will be returned.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts with these properties will be returned.` `", }, searchExcludeProps: cli.StringFlag{ Name: excludeProps, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts without the specified properties will be returned` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts without the specified properties will be returned` `", }, searchTransitive: cli.BoolFlag{ Name: transitive, @@ -930,7 +930,7 @@ var flagsMap = map[string]cli.Flag{ }, searchInclude: cli.StringFlag{ Name: searchInclude, - Usage: fmt.Sprintf("[Optional] List of fields in the form of \"value1;value2;...\". Only the path and the fields that are specified will be returned. The fields must be part of the 'items' AQL domain. For the full supported items list, check %sjfrog-artifactory-documentation/artifactory-query-language` `", coreutils.JFrogHelpUrl), + Usage: fmt.Sprintf("[Optional] List of semicolon-separated(;) fields in the form of \"value1;value2;...\". Only the path and the fields that are specified will be returned. The fields must be part of the 'items' AQL domain. For the full supported items list, check %sjfrog-artifactory-documentation/artifactory-query-language` `", coreutils.JFrogHelpUrl), }, propsRecursive: cli.BoolTFlag{ Name: recursive, @@ -938,11 +938,11 @@ var flagsMap = map[string]cli.Flag{ }, propsProps: cli.StringFlag{ Name: props, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts with these properties are affected.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts with these properties are affected.` `", }, propsExcludeProps: cli.StringFlag{ Name: excludeProps, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". Only artifacts without the specified properties are affected` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\". Only artifacts without the specified properties are affected` `", }, buildUrl: cli.StringFlag{ Name: buildUrl, @@ -1026,7 +1026,7 @@ var flagsMap = map[string]cli.Flag{ }, bprProps: cli.StringFlag{ Name: props, - Usage: "[Optional] List of properties in the form of \"key1=value1;key2=value2,...\". A list of properties to attach to the build artifacts.` `", + Usage: "[Optional] List of semicolon-separated(;) properties in the form of \"key1=value1;key2=value2;...\" to be attached to the build artifacts.` `", }, targetDockerImage: cli.StringFlag{ Name: "target-docker-image", @@ -1054,7 +1054,7 @@ var flagsMap = map[string]cli.Flag{ }, excludeBuilds: cli.StringFlag{ Name: excludeBuilds, - Usage: "[Optional] List of build numbers in the form of \"value1,value2,...\", that should not be removed from Artifactory.` `", + Usage: "[Optional] List of comma-separated(,) build numbers in the form of \"value1,value2,...\", that should not be removed from Artifactory.` `", }, deleteArtifacts: cli.BoolFlag{ Name: deleteArtifacts, @@ -1066,7 +1066,7 @@ var flagsMap = map[string]cli.Flag{ }, refs: cli.StringFlag{ Name: refs, - Usage: "[Default: refs/remotes/*] List of Git references in the form of \"ref1,ref2,...\" which should be preserved.` `", + Usage: "[Default: refs/remotes/*] List of comma-separated(,) Git references in the form of \"ref1,ref2,...\" which should be preserved.` `", }, glcRepo: cli.StringFlag{ Name: repo, @@ -1179,11 +1179,11 @@ var flagsMap = map[string]cli.Flag{ }, vars: cli.StringFlag{ Name: vars, - Usage: "[Optional] List of variables in the form of \"key1=value1;key2=value2;...\" (wrapped by quotes) to be replaced in the template. In the template, the variables should be used as follows: ${key1}.` `", + Usage: "[Optional] List of semicolon-separated(;) variables in the form of \"key1=value1;key2=value2;...\" (wrapped by quotes) to be replaced in the template. In the template, the variables should be used as follows: ${key1}.` `", }, rtAtcGroups: cli.StringFlag{ Name: Groups, - Usage: "[Default: *] A list of comma-separated groups for the access token to be associated with. " + + Usage: "[Default: *] A list of comma-separated(,) groups for the access token to be associated with. " + "Specify * to indicate that this is a 'user-scoped token', i.e., the token provides the same access privileges that the current subject has, and is therefore evaluated dynamically. " + "A non-admin user can only provide a scope that is a subset of the groups to which he belongs` `", }, @@ -1201,7 +1201,7 @@ var flagsMap = map[string]cli.Flag{ }, rtAtcAudience: cli.StringFlag{ Name: Audience, - Usage: "[Optional] A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs, as obtained by the 'jfrog rt curl api/system/service_id' command.` `", + Usage: "[Optional] A space-separated list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs, as obtained by the 'jfrog rt curl api/system/service_id' command.` `", }, usersCreateCsv: cli.StringFlag{ Name: csv, @@ -1213,7 +1213,7 @@ var flagsMap = map[string]cli.Flag{ }, UsersGroups: cli.StringFlag{ Name: UsersGroups, - Usage: "[Optional] A list of comma-separated groups for the new users to be associated with.` `", + Usage: "[Optional] A list of comma-separated(,) groups for the new users to be associated with.` `", }, Replace: cli.BoolFlag{ Name: Replace, @@ -1300,7 +1300,7 @@ var flagsMap = map[string]cli.Flag{ }, countryCodes: cli.StringFlag{ Name: countryCodes, - Usage: "[Default: '*'] Semicolon-separated list of wildcard filters for site country codes.` `", + Usage: "[Default: '*'] List of semicolon-separated(;) wildcard filters for site country codes.` `", }, sync: cli.BoolFlag{ Name: sync, @@ -1316,7 +1316,7 @@ var flagsMap = map[string]cli.Flag{ }, targetProps: cli.StringFlag{ Name: targetProps, - Usage: "[Optional] The list of properties, in the form of key1=value1;key2=value2,..., to be added to the artifacts after distribution of the release bundle.` `", + Usage: "[Optional] List of semicolon-separated(;) properties, in the form of \"key1=value1;key2=value2;...\" to be added to the artifacts after distribution of the release bundle.` `", }, // Xray's commands Flags @@ -1378,15 +1378,15 @@ var flagsMap = map[string]cli.Flag{ }, watches: cli.StringFlag{ Name: watches, - Usage: "[Optional] A comma-separated list of Xray watches, to determine Xray's violations creation.` `", + Usage: "[Optional] A comma-separated(,) list of Xray watches, to determine Xray's violations creation.` `", }, workingDirs: cli.StringFlag{ Name: workingDirs, - Usage: "[Optional] A comma-separated list of relative working directories, to determine audit targets locations.` `", + Usage: "[Optional] A comma-separated(,) list of relative working directories, to determine audit targets locations.` `", }, ExclusionsAudit: cli.StringFlag{ Name: exclusions, - Usage: "[Default: *node_modules*;*target*;*venv*;*test*] List of exclusions separated by semicolons, utilized to skip sub-projects from undergoing an audit. These exclusions may incorporate the * and ? wildcards.` `", + Usage: "[Default: *node_modules*;*target*;*venv*;*test*] List of semicolon-separated(;) exclusions, utilized to skip sub-projects from undergoing an audit. These exclusions may incorporate the * and ? wildcards.` `", }, ExtendedTable: cli.BoolFlag{ Name: ExtendedTable, @@ -1466,7 +1466,7 @@ var flagsMap = map[string]cli.Flag{ }, goPublishExclusions: cli.StringFlag{ Name: exclusions, - Usage: "[Optional] Semicolon-separated list of exclusions. Exclusions can include the * and the ? wildcards.` `", + Usage: "[Optional] List of semicolon-separated(;) exclusions. Exclusions can include the * and the ? wildcards.` `", }, rescan: cli.BoolFlag{ Name: rescan, @@ -1568,19 +1568,19 @@ var flagsMap = map[string]cli.Flag{ }, IncludeRepos: cli.StringFlag{ Name: IncludeRepos, - Usage: "[Optional] A list of semicolon-separated repositories to include in the transfer. You can use wildcards to specify patterns for the repositories' names.` `", + Usage: "[Optional] List of semicolon-separated(;) repositories to include in the transfer. You can use wildcards to specify patterns for the repositories' names.` `", }, ExcludeRepos: cli.StringFlag{ Name: ExcludeRepos, - Usage: "[Optional] A list of semicolon-separated repositories to exclude from the transfer. You can use wildcards to specify patterns for the repositories' names.` `", + Usage: "[Optional] List of semicolon-separated(;) repositories to exclude from the transfer. You can use wildcards to specify patterns for the repositories' names.` `", }, IncludeProjects: cli.StringFlag{ Name: IncludeProjects, - Usage: "[Optional] A list of semicolon-separated JFrog Project keys to include in the transfer. You can use wildcards to specify patterns for the JFrog Project keys.` `", + Usage: "[Optional] List of semicolon-separated(;) JFrog Project keys to include in the transfer. You can use wildcards to specify patterns for the JFrog Project keys.` `", }, ExcludeProjects: cli.StringFlag{ Name: ExcludeProjects, - Usage: "[Optional] A list of semicolon-separated JFrog Projects to exclude from the transfer. You can use wildcards to specify patterns for the project keys.` `", + Usage: "[Optional] List of semicolon-separated(;) JFrog Projects to exclude from the transfer. You can use wildcards to specify patterns for the project keys.` `", }, IgnoreState: cli.BoolFlag{ Name: IgnoreState, @@ -1676,12 +1676,12 @@ var flagsMap = map[string]cli.Flag{ }, lcIncludeRepos: cli.StringFlag{ Name: IncludeRepos, - Usage: "[Optional] A list of semicolon-separated repositories to include in the promotion. If this property is left undefined, all repositories (except those specifically excluded) are included in the promotion. " + + Usage: "[Optional] List of semicolon-separated(;) repositories to include in the promotion. If this property is left undefined, all repositories (except those specifically excluded) are included in the promotion. " + "If one or more repositories are specifically included, all other repositories are excluded.` `", }, lcExcludeRepos: cli.StringFlag{ Name: ExcludeRepos, - Usage: "[Optional] A list of semicolon-separated repositories to exclude from the promotion.` `", + Usage: "[Optional] List of semicolon-separated(;) repositories to exclude from the promotion.` `", }, atcProject: cli.StringFlag{ Name: Project, @@ -1693,7 +1693,7 @@ var flagsMap = map[string]cli.Flag{ }, atcGroups: cli.StringFlag{ Name: Groups, - Usage: "[Optional] A list of comma-separated groups for the access token to be associated with. " + + Usage: "[Optional] A list of comma-separated(,) groups for the access token to be associated with. " + "This is only available for administrators.` `", }, atcScope: cli.StringFlag{ From 3f830ed9ecd0fa5821315b21043f0f57c283906b Mon Sep 17 00:00:00 2001 From: Robi Nino Date: Mon, 6 May 2024 14:34:34 +0300 Subject: [PATCH 6/8] Fix release bundle creation with project (#2536) --- artifactory/cli.go | 10 +++++----- distribution/cli.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- lifecycle/cli.go | 16 ++++++++++------ lifecycle/cli_test.go | 13 +++++++++++++ lifecycle/testdata/specfile.json | 7 +++++++ utils/cliutils/utils.go | 23 +++++++++++++++++------ 8 files changed, 57 insertions(+), 22 deletions(-) create mode 100644 lifecycle/testdata/specfile.json diff --git a/artifactory/cli.go b/artifactory/cli.go index ea377e021..b8bbefb27 100644 --- a/artifactory/cli.go +++ b/artifactory/cli.go @@ -1186,7 +1186,7 @@ func prepareDownloadCommand(c *cli.Context) (*spec.SpecFiles, error) { var downloadSpec *spec.SpecFiles var err error if c.IsSet("spec") { - downloadSpec, err = cliutils.GetSpec(c, true) + downloadSpec, err = cliutils.GetSpec(c, true, true) } else { downloadSpec, err = createDefaultDownloadSpec(c) } @@ -1315,7 +1315,7 @@ func prepareCopyMoveCommand(c *cli.Context) (*spec.SpecFiles, error) { var copyMoveSpec *spec.SpecFiles var err error if c.IsSet("spec") { - copyMoveSpec, err = cliutils.GetSpec(c, false) + copyMoveSpec, err = cliutils.GetSpec(c, false, true) } else { copyMoveSpec, err = createDefaultCopyMoveSpec(c) } @@ -1403,7 +1403,7 @@ func prepareDeleteCommand(c *cli.Context) (*spec.SpecFiles, error) { var deleteSpec *spec.SpecFiles var err error if c.IsSet("spec") { - deleteSpec, err = cliutils.GetSpec(c, false) + deleteSpec, err = cliutils.GetSpec(c, false, true) } else { deleteSpec, err = createDefaultDeleteSpec(c) } @@ -1458,7 +1458,7 @@ func prepareSearchCommand(c *cli.Context) (*spec.SpecFiles, error) { var searchSpec *spec.SpecFiles var err error if c.IsSet("spec") { - searchSpec, err = cliutils.GetSpec(c, false) + searchSpec, err = cliutils.GetSpec(c, false, true) } else { searchSpec, err = createDefaultSearchSpec(c) } @@ -1525,7 +1525,7 @@ func preparePropsCmd(c *cli.Context) (*generic.PropsCommand, error) { var props string if c.IsSet("spec") { props = c.Args()[0] - propsSpec, err = cliutils.GetSpec(c, false) + propsSpec, err = cliutils.GetSpec(c, false, true) } else { propsSpec, err = createDefaultPropertiesSpec(c) if c.NArg() == 1 { diff --git a/distribution/cli.go b/distribution/cli.go index bc118b1e3..0410cfee2 100644 --- a/distribution/cli.go +++ b/distribution/cli.go @@ -95,7 +95,7 @@ func releaseBundleCreateCmd(c *cli.Context) error { var releaseBundleCreateSpec *spec.SpecFiles var err error if c.IsSet("spec") { - releaseBundleCreateSpec, err = cliutils.GetSpec(c, true) + releaseBundleCreateSpec, err = cliutils.GetSpec(c, true, true) } else { releaseBundleCreateSpec = createDefaultReleaseBundleSpec(c) } @@ -137,7 +137,7 @@ func releaseBundleUpdateCmd(c *cli.Context) error { var releaseBundleUpdateSpec *spec.SpecFiles var err error if c.IsSet("spec") { - releaseBundleUpdateSpec, err = cliutils.GetSpec(c, true) + releaseBundleUpdateSpec, err = cliutils.GetSpec(c, true, true) } else { releaseBundleUpdateSpec = createDefaultReleaseBundleSpec(c) } diff --git a/go.mod b/go.mod index 1fac44d15..fa882baf0 100644 --- a/go.mod +++ b/go.mod @@ -139,7 +139,7 @@ require ( replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7 -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 +replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240505164307-d12abb9f140e // replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.0.6-0.20240408061620-c9b84da33d5e diff --git a/go.sum b/go.sum index 70d429260..39f8e4958 100644 --- a/go.sum +++ b/go.sum @@ -138,8 +138,8 @@ github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7 h1:C2Zl github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7/go.mod h1:2tdqY2OG3Cv5xQX4LhKM6VsJLp+TLK3Dq7DXHcqFVkg= github.com/jfrog/jfrog-cli-security v1.1.0 h1:ifCjFJSa1D1pWyW/ADYPqnMkOddzkAT/WY4vHAufn1g= github.com/jfrog/jfrog-cli-security v1.1.0/go.mod h1:086t7e/einVAGfBXxRdEGDKovWt67I6SqUb1rcpdiZc= -github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041 h1:cDTm4RxkI+RA8aNmdfM2BVxb5iCoXjLjhb+M+ReEIrE= -github.com/jfrog/jfrog-client-go v1.28.1-0.20240430132902-9d4dfaf05041/go.mod h1:FprEW0Sqhj6ZSFTFk9NCni+ovFAYMA3zCBmNX4hGXgQ= +github.com/jfrog/jfrog-client-go v1.28.1-0.20240505164307-d12abb9f140e h1:ySI3daaq/qiJ7oWZxBJjBrQozYo5tHGdkLeLBAUiCj8= +github.com/jfrog/jfrog-client-go v1.28.1-0.20240505164307-d12abb9f140e/go.mod h1:FprEW0Sqhj6ZSFTFk9NCni+ovFAYMA3zCBmNX4hGXgQ= github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI= github.com/jszwec/csvutil v1.10.0/go.mod h1:/E4ONrmGkwmWsk9ae9jpXnv9QT8pLHEPcCirMFhxG9I= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= diff --git a/lifecycle/cli.go b/lifecycle/cli.go index dd7dd2bc0..b47731934 100644 --- a/lifecycle/cli.go +++ b/lifecycle/cli.go @@ -155,12 +155,9 @@ func create(c *cli.Context) (err error) { return err } - var creationSpec *spec.SpecFiles - if c.IsSet("spec") { - creationSpec, err = cliutils.GetSpec(c, true) - if err != nil { - return - } + creationSpec, err := getReleaseBundleCreationSpec(c) + if err != nil { + return } lcDetails, err := createLifecycleDetailsByFlags(c) @@ -175,6 +172,13 @@ func create(c *cli.Context) (err error) { return commands.Exec(createCmd) } +func getReleaseBundleCreationSpec(c *cli.Context) (*spec.SpecFiles, error) { + if c.IsSet("spec") { + return cliutils.GetSpec(c, true, false) + } + return nil, nil +} + func promote(c *cli.Context) error { if show, err := cliutils.ShowCmdHelpIfNeeded(c, c.Args()); show || err != nil { return err diff --git a/lifecycle/cli_test.go b/lifecycle/cli_test.go index 065b64c14..65b911958 100644 --- a/lifecycle/cli_test.go +++ b/lifecycle/cli_test.go @@ -4,6 +4,7 @@ import ( "github.com/jfrog/jfrog-cli/utils/cliutils" "github.com/jfrog/jfrog-cli/utils/tests" "github.com/stretchr/testify/assert" + "path/filepath" "testing" ) @@ -43,3 +44,15 @@ func TestValidateCreateReleaseBundleContext(t *testing.T) { }) } } + +// Validates that the project option does not override the project field in the spec file. +func TestCreateReleaseBundleSpecWithProject(t *testing.T) { + projectKey := "myproj" + specFile := filepath.Join("testdata", "specfile.json") + context, _ := tests.CreateContext(t, []string{"spec=" + specFile, "project=" + projectKey}, []string{}) + creationSpec, err := getReleaseBundleCreationSpec(context) + assert.NoError(t, err) + assert.Equal(t, creationSpec.Get(0).Pattern, "path/to/file") + creationSpec.Get(0).Project = "" + assert.Equal(t, projectKey, cliutils.GetProject(context)) +} diff --git a/lifecycle/testdata/specfile.json b/lifecycle/testdata/specfile.json new file mode 100644 index 000000000..8d28c94c9 --- /dev/null +++ b/lifecycle/testdata/specfile.json @@ -0,0 +1,7 @@ +{ + "files": [ + { + "pattern": "path/to/file" + } + ] +} \ No newline at end of file diff --git a/utils/cliutils/utils.go b/utils/cliutils/utils.go index b9f50730f..47fcd3ad1 100644 --- a/utils/cliutils/utils.go +++ b/utils/cliutils/utils.go @@ -401,19 +401,30 @@ func handleSecretInput(c *cli.Context, stringFlag, stdinFlag string) (secret str return commonCliUtils.HandleSecretInput(stringFlag, c.String(stringFlag), stdinFlag, c.Bool(stdinFlag)) } -func GetSpec(c *cli.Context, isDownload bool) (specFiles *speccore.SpecFiles, err error) { +func GetSpec(c *cli.Context, isDownload, overrideFieldsIfSet bool) (specFiles *speccore.SpecFiles, err error) { specFiles, err = speccore.CreateSpecFromFile(c.String("spec"), coreutils.SpecVarsStringToMap(c.String("spec-vars"))) if err != nil { return nil, err } - // Override spec with CLI options + if isDownload { + trimPatternPrefix(specFiles) + } + if overrideFieldsIfSet { + overrideSpecFields(c, specFiles) + } + return +} + +func overrideSpecFields(c *cli.Context, specFiles *speccore.SpecFiles) { for i := 0; i < len(specFiles.Files); i++ { - if isDownload { - specFiles.Get(i).Pattern = strings.TrimPrefix(specFiles.Get(i).Pattern, "/") - } OverrideFieldsIfSet(specFiles.Get(i), c) } - return +} + +func trimPatternPrefix(specFiles *speccore.SpecFiles) { + for i := 0; i < len(specFiles.Files); i++ { + specFiles.Get(i).Pattern = strings.TrimPrefix(specFiles.Get(i).Pattern, "/") + } } func GetFileSystemSpec(c *cli.Context) (fsSpec *speccore.SpecFiles, err error) { From 4f1043c186878895a4f177bfea50c6d99db2112e Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Tue, 7 May 2024 14:41:25 +0300 Subject: [PATCH 7/8] Improve help section layout (#2539) --- artifactory/cli.go | 1 - buildtools/cli.go | 1 - docs/artifactory/buildaddgit/help.go | 10 ++--- docs/artifactory/transferconfig/help.go | 3 +- docs/general/token/help.go | 5 +-- main.go | 50 ++++++++++++------------- 6 files changed, 34 insertions(+), 36 deletions(-) diff --git a/artifactory/cli.go b/artifactory/cli.go index b8bbefb27..736e89551 100644 --- a/artifactory/cli.go +++ b/artifactory/cli.go @@ -640,7 +640,6 @@ func GetCommands() []cli.Command { Name: "go", Hidden: true, Flags: cliutils.GetCommandFlags(cliutils.Go), - Aliases: []string{"go"}, Usage: gocommand.GetDescription(), HelpName: corecommon.CreateUsage("rt go", gocommand.GetDescription(), gocommand.Usage), UsageText: gocommand.GetArguments(), diff --git a/buildtools/cli.go b/buildtools/cli.go index 334ec2181..9dfc3de4b 100644 --- a/buildtools/cli.go +++ b/buildtools/cli.go @@ -208,7 +208,6 @@ func GetCommands() []cli.Command { { Name: "go", Flags: cliutils.GetCommandFlags(cliutils.Go), - Aliases: []string{"go"}, Usage: gocommand.GetDescription(), HelpName: corecommon.CreateUsage("go", gocommand.GetDescription(), gocommand.Usage), UsageText: gocommand.GetArguments(), diff --git a/docs/artifactory/buildaddgit/help.go b/docs/artifactory/buildaddgit/help.go index d3d6b73d1..cc7ad7544 100644 --- a/docs/artifactory/buildaddgit/help.go +++ b/docs/artifactory/buildaddgit/help.go @@ -3,11 +3,11 @@ package buildaddgit var Usage = []string{"rt bag [command options] [Path To .git]"} func GetDescription() string { - return "Collects the Git revision and URL from the local .git directory and adds it to the build-info.\n" + - "It can also collect the list of tracked project issues (for example, issues stored in JIRA or other bug tracking systems) and add them to the build-info.\n" + - "The issues are collected by reading the git commit messages from the local git log.\n" + - "Each commit message is matched against a pre-configured regular expression, which retrieves the issue ID and issue summary.\n" + - "The information required for collecting the issues is retrieved from a yaml configuration file provided to the command." + return `Collects the Git revision and URL from the local .git directory and adds it to the build-info. + It can also collect the list of tracked project issues (for example, issues stored in JIRA or other bug tracking systems) and add them to the build-info. + The issues are collected by reading the git commit messages from the local git log. + Each commit message is matched against a pre-configured regular expression, which retrieves the issue ID and issue summary. + The information required for collecting the issues is retrieved from a yaml configuration file provided to the command.` } func GetArguments() string { diff --git a/docs/artifactory/transferconfig/help.go b/docs/artifactory/transferconfig/help.go index 19e47cccb..b2df7801b 100644 --- a/docs/artifactory/transferconfig/help.go +++ b/docs/artifactory/transferconfig/help.go @@ -3,7 +3,8 @@ package transferconfig var Usage = []string{"rt transfer-config [command options] "} func GetDescription() string { - return "Copy full Artifactory configuration from source Artifactory server to target Artifactory server. Warning - This action will wipe all Artifactory content in this target server." + return `Copy full Artifactory configuration from source Artifactory server to target Artifactory server. + Warning - This action will wipe all Artifactory content in this target server.` } func GetArguments() string { diff --git a/docs/general/token/help.go b/docs/general/token/help.go index 601a1665d..07d65ef51 100644 --- a/docs/general/token/help.go +++ b/docs/general/token/help.go @@ -3,9 +3,8 @@ package token var Usage = []string{"atc", "atc "} func GetDescription() string { - return `Creates an access token. - By default, an user-scoped token will be created. - Administrator may provide the scope explicitly with '--scope', or implicitly with '--groups', '--grant-admin'.` + return `Creates an access token. By default, an user-scoped token will be created. + Administrator may provide the scope explicitly with '--scope', or implicitly with '--groups', '--grant-admin'.` } func GetArguments() string { diff --git a/main.go b/main.go index da03f8554..80e7a6453 100644 --- a/main.go +++ b/main.go @@ -64,10 +64,10 @@ const subcommandHelpTemplate = `NAME: {{.HelpName}} - {{.Usage}} USAGE: - {{if .Usage}}{{.Usage}}{{ "\n\t" }}{{end}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} [arguments...] + {{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} [arguments...] COMMANDS: - {{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}} + {{range .VisibleCommands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}} {{end}}{{if .VisibleFlags}}{{if .ArgsUsage}} Arguments: {{.ArgsUsage}}{{ "\n" }}{{end}} @@ -94,7 +94,7 @@ func execMain() error { app := cli.NewApp() app.Name = jfrogAppName - app.Usage = "See https://github.com/jfrog/jfrog-cli for usage instructions." + app.Usage = "See https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli for full documentation." app.Version = cliutils.GetVersion() args := os.Args cliutils.SetCliExecutableName(args[0]) @@ -110,7 +110,7 @@ func execMain() error { cli.AppHelpTemplate = getAppHelpTemplate() cli.SubcommandHelpTemplate = subcommandHelpTemplate app.CommandNotFound = func(c *cli.Context, command string) { - _, err := fmt.Fprintf(c.App.Writer, "'"+c.App.Name+" "+command+"' is not a jf command. See --help\n") + _, err = fmt.Fprintf(c.App.Writer, "'"+c.App.Name+" "+command+"' is not a jf command. See --help\n") if err != nil { clientlog.Debug(err) os.Exit(1) @@ -209,32 +209,33 @@ func searchSimilarCmds(cmds []cli.Command, toCompare string) (bestSimilarity []s } const otherCategory = "Other" +const commandNamespacesCategory = "Command Namespaces" func getCommands() ([]cli.Command, error) { cliNameSpaces := []cli.Command{ { Name: cliutils.CmdArtifactory, - Usage: "JFrog Artifactory commands.", + Usage: "Artifactory commands.", Subcommands: artifactory.GetCommands(), - Category: otherCategory, + Category: commandNamespacesCategory, }, { Name: cliutils.CmdMissionControl, - Usage: "JFrog Mission Control commands.", + Usage: "Mission Control commands.", Subcommands: missioncontrol.GetCommands(), - Category: otherCategory, + Category: commandNamespacesCategory, }, { Name: cliutils.CmdDistribution, - Usage: "JFrog Distribution V1 commands.", + Usage: "Distribution V1 commands.", Subcommands: distribution.GetCommands(), - Category: otherCategory, + Category: commandNamespacesCategory, }, { Name: cliutils.CmdPipelines, - Usage: "JFrog Pipelines commands.", + Usage: "Pipelines commands.", Subcommands: pipelines.GetCommands(), - Category: otherCategory, + Category: commandNamespacesCategory, }, { Name: cliutils.CmdCompletion, @@ -246,14 +247,14 @@ func getCommands() ([]cli.Command, error) { Name: cliutils.CmdPlugin, Usage: "Plugins handling commands.", Subcommands: plugins.GetCommands(), - Category: otherCategory, + Category: commandNamespacesCategory, }, { Name: cliutils.CmdConfig, Aliases: []string{"c"}, - Usage: "Config server configurations commands.", + Usage: "Server configurations commands.", Subcommands: config.GetCommands(), - Category: otherCategory, + Category: commandNamespacesCategory, }, { Name: cliutils.CmdProject, @@ -275,18 +276,16 @@ func getCommands() ([]cli.Command, error) { }, }, { - Name: "setup", - HideHelp: true, - Hidden: true, - Flags: cliutils.GetCommandFlags(cliutils.Setup), - Action: SetupCmd, + Name: "setup", + Hidden: true, + Flags: cliutils.GetCommandFlags(cliutils.Setup), + Action: SetupCmd, }, { - Name: "intro", - HideHelp: true, - Hidden: true, - Flags: cliutils.GetCommandFlags(cliutils.Intro), - Action: IntroCmd, + Name: "intro", + Hidden: true, + Flags: cliutils.GetCommandFlags(cliutils.Intro), + Action: IntroCmd, }, { Name: cliutils.CmdOptions, @@ -322,6 +321,7 @@ func getCommands() ([]cli.Command, error) { UsageText: tokenDocs.GetArguments(), ArgsUsage: common.CreateEnvVars(), BashComplete: corecommon.CreateBashCompletionFunc(), + Category: otherCategory, Action: token.AccessTokenCreateCmd, }, } From dd2d090afc07b851fce3027092f3c17f35ac2a68 Mon Sep 17 00:00:00 2001 From: Yahav Itschak Date: Thu, 9 May 2024 16:51:11 +0300 Subject: [PATCH 8/8] Bump ver from 2.56.0 to 2.56.1 (#2543) --- build/npm/v2-jf/package-lock.json | 2 +- build/npm/v2-jf/package.json | 2 +- build/npm/v2/package-lock.json | 2 +- build/npm/v2/package.json | 2 +- go.mod | 18 +++++++++--------- go.sum | 28 ++++++++++++++-------------- utils/cliutils/cli_consts.go | 2 +- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/build/npm/v2-jf/package-lock.json b/build/npm/v2-jf/package-lock.json index 503067eaf..03260e7f3 100644 --- a/build/npm/v2-jf/package-lock.json +++ b/build/npm/v2-jf/package-lock.json @@ -1,5 +1,5 @@ { "name": "jfrog-cli-v2-jf", - "version": "2.56.0", + "version": "2.56.1", "lockfileVersion": 1 } diff --git a/build/npm/v2-jf/package.json b/build/npm/v2-jf/package.json index fa71b47a5..c50e4f9e3 100644 --- a/build/npm/v2-jf/package.json +++ b/build/npm/v2-jf/package.json @@ -1,6 +1,6 @@ { "name": "jfrog-cli-v2-jf", - "version": "2.56.0", + "version": "2.56.1", "description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸", "homepage": "https://github.com/jfrog/jfrog-cli", "preferGlobal": true, diff --git a/build/npm/v2/package-lock.json b/build/npm/v2/package-lock.json index 07c9ae886..d02acb3ac 100644 --- a/build/npm/v2/package-lock.json +++ b/build/npm/v2/package-lock.json @@ -1,5 +1,5 @@ { "name": "jfrog-cli-v2", - "version": "2.56.0", + "version": "2.56.1", "lockfileVersion": 2 } diff --git a/build/npm/v2/package.json b/build/npm/v2/package.json index 68759a31a..f28f79fb2 100644 --- a/build/npm/v2/package.json +++ b/build/npm/v2/package.json @@ -1,6 +1,6 @@ { "name": "jfrog-cli-v2", - "version": "2.56.0", + "version": "2.56.1", "description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸", "homepage": "https://github.com/jfrog/jfrog-cli", "preferGlobal": true, diff --git a/go.mod b/go.mod index fa882baf0..b210a7cb4 100644 --- a/go.mod +++ b/go.mod @@ -10,15 +10,15 @@ require ( github.com/jfrog/archiver/v3 v3.6.0 github.com/jfrog/build-info-go v1.9.26 github.com/jfrog/gofrog v1.7.1 - github.com/jfrog/jfrog-cli-core/v2 v2.51.0 + github.com/jfrog/jfrog-cli-core/v2 v2.52.0 github.com/jfrog/jfrog-cli-security v1.1.0 - github.com/jfrog/jfrog-client-go v1.40.1 + github.com/jfrog/jfrog-client-go v1.40.2 github.com/jszwec/csvutil v1.10.0 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.23.0 github.com/urfave/cli v1.22.15 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 golang.org/x/term v0.20.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -66,7 +66,7 @@ require ( github.com/gookit/color v1.5.4 // 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.8 // indirect + github.com/jedib0t/go-pretty/v6 v6.5.9 // indirect github.com/jfrog/jfrog-apps-config v1.0.1 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.17.4 // indirect @@ -122,13 +122,13 @@ require ( go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect - golang.org/x/crypto v0.22.0 // indirect + golang.org/x/crypto v0.23.0 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.20.0 // indirect + golang.org/x/tools v0.21.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.33.0 // indirect @@ -137,9 +137,9 @@ 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.20240505160419-7173b506c6b7 +// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7 -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240505164307-d12abb9f140e +// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20240505164307-d12abb9f140e // replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security v1.0.6-0.20240408061620-c9b84da33d5e diff --git a/go.sum b/go.sum index 39f8e4958..ed927e34e 100644 --- a/go.sum +++ b/go.sum @@ -124,8 +124,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.8 h1:8BCzJdSvUbaDuRba4YVh+SKMGcAAKdkcF3SVFbrHAtQ= -github.com/jedib0t/go-pretty/v6 v6.5.8/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E= +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/jfrog/archiver/v3 v3.6.0 h1:OVZ50vudkIQmKMgA8mmFF9S0gA47lcag22N13iV3F1w= github.com/jfrog/archiver/v3 v3.6.0/go.mod h1:fCAof46C3rAXgZurS8kNRNdSVMKBbZs+bNNhPYxLldI= github.com/jfrog/build-info-go v1.9.26 h1:1Ddc6+Ecvhc+UMnKhRVG1jGM6fYNwA49207azTBGBc8= @@ -134,12 +134,12 @@ github.com/jfrog/gofrog v1.7.1 h1:ME1Meg4hukAT/7X6HUQCVSe4DNjMZACCP8aCY37EW/w= github.com/jfrog/gofrog v1.7.1/go.mod h1:X7bjfWoQDN0Z4FQGbE91j3gbPP7Urwzm4Z8tkvrlbRI= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7 h1:C2ZlXINWp0m2H22hXa5LTjEh2xY86Cj/VFrbHHPt2O4= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240505160419-7173b506c6b7/go.mod h1:2tdqY2OG3Cv5xQX4LhKM6VsJLp+TLK3Dq7DXHcqFVkg= +github.com/jfrog/jfrog-cli-core/v2 v2.52.0 h1:0+kgk9FIJCIMLlJWC2SfMU9vb9Sa0rBtH+CqxW3bsxU= +github.com/jfrog/jfrog-cli-core/v2 v2.52.0/go.mod h1:hB5R+BgmCbOoz5HZyyqEdv408rL26ej7ZSHfXGpLqmw= github.com/jfrog/jfrog-cli-security v1.1.0 h1:ifCjFJSa1D1pWyW/ADYPqnMkOddzkAT/WY4vHAufn1g= github.com/jfrog/jfrog-cli-security v1.1.0/go.mod h1:086t7e/einVAGfBXxRdEGDKovWt67I6SqUb1rcpdiZc= -github.com/jfrog/jfrog-client-go v1.28.1-0.20240505164307-d12abb9f140e h1:ySI3daaq/qiJ7oWZxBJjBrQozYo5tHGdkLeLBAUiCj8= -github.com/jfrog/jfrog-client-go v1.28.1-0.20240505164307-d12abb9f140e/go.mod h1:FprEW0Sqhj6ZSFTFk9NCni+ovFAYMA3zCBmNX4hGXgQ= +github.com/jfrog/jfrog-client-go v1.40.2 h1:zdCWPPT11r0bMGnAXGhZPb3RrIINhiTFCceQABhguZ4= +github.com/jfrog/jfrog-client-go v1.40.2/go.mod h1:m3hIn12eFWk5nJH1swPRtFrjXbiiCscOpX+v/vCdmNI= github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI= github.com/jszwec/csvutil v1.10.0/go.mod h1:/E4ONrmGkwmWsk9ae9jpXnv9QT8pLHEPcCirMFhxG9I= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= @@ -313,10 +313,10 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -335,8 +335,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -400,8 +400,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/utils/cliutils/cli_consts.go b/utils/cliutils/cli_consts.go index 20e87000a..a3ccc577f 100644 --- a/utils/cliutils/cli_consts.go +++ b/utils/cliutils/cli_consts.go @@ -4,7 +4,7 @@ import "time" const ( // General CLI constants - CliVersion = "2.56.0" + CliVersion = "2.56.1" ClientAgent = "jfrog-cli-go" // CLI base commands constants: