From d75072c3da3d8b1dfaf3f68e39882e9458f2ea4b Mon Sep 17 00:00:00 2001 From: Omer Zidkoni Date: Mon, 18 Sep 2023 18:13:25 +0300 Subject: [PATCH 1/5] Align changes with core --- go.mod | 2 +- go.sum | 4 ++-- scan/cli.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 4fb2d7d49..293ebcf6c 100644 --- a/go.mod +++ b/go.mod @@ -126,7 +126,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904170814-03a7938bae94 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index efe0a6983..4f10d5ce1 100644 --- a/go.sum +++ b/go.sum @@ -239,8 +239,6 @@ github.com/jfrog/build-info-go v1.9.10 h1:uXnDLVxpqxoAMpXcki00QaBB+M2BoGMMpHODPk github.com/jfrog/build-info-go v1.9.10/go.mod h1:ujJ8XQZMdT2tMkLSMJNyDd1pCY+duwHdjV+9or9FLIg= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.43.1 h1:SkbaQ4eAUrVa6r7eYNI6Co9TrNk3NUz2/LFYawAEVBc= -github.com/jfrog/jfrog-cli-core/v2 v2.43.1/go.mod h1:DKTOX9TsPkyI68GM4XdDTD7XDr+tOBqeK70DZZmu+4Q= github.com/jfrog/jfrog-client-go v1.32.3 h1:B2M8Gu8EMrokbHWPPDgN1b7YRWwf0oe746epvQASK6c= github.com/jfrog/jfrog-client-go v1.32.3/go.mod h1:UewnwkIf/77HzBgwCPzOHZCK6V/Nw5/JwdzN/tRb4aU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -306,6 +304,8 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= +github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7 h1:4CGOWjM/PGCiKeFpptT58sye0S870WWcT+wcLjips+U= +github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7/go.mod h1:DKTOX9TsPkyI68GM4XdDTD7XDr+tOBqeK70DZZmu+4Q= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= diff --git a/scan/cli.go b/scan/cli.go index 33c6df002..e9342f2b9 100644 --- a/scan/cli.go +++ b/scan/cli.go @@ -185,10 +185,10 @@ func AuditCmd(c *cli.Context) error { // On Maven we use '--mvn' flag techExists = c.Bool("mvn") } else { - techExists = c.Bool(tech.ToString()) + techExists = c.Bool(tech.String()) } if techExists { - technologies = append(technologies, tech.ToString()) + technologies = append(technologies, tech.String()) } } auditCmd.SetTechnologies(technologies) From 5e2a11e1e1902444ab9b78395a4f1cfa46f8cb5e Mon Sep 17 00:00:00 2001 From: Omer Zidkoni Date: Mon, 18 Sep 2023 18:13:25 +0300 Subject: [PATCH 2/5] Align changes with core --- artifactory_test.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- scan/cli.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/artifactory_test.go b/artifactory_test.go index b00a48d3f..bda9e3736 100644 --- a/artifactory_test.go +++ b/artifactory_test.go @@ -5601,7 +5601,7 @@ func testProjectInit(t *testing.T, projectExampleName string, technology coreuti // Copy a simple project in a temp work dir tmpWorkDir, deleteWorkDir := coretests.CreateTempDirWithCallbackAndAssert(t) defer deleteWorkDir() - testdataSrc := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), technology.ToString(), projectExampleName) + testdataSrc := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), technology.String(), projectExampleName) err = biutils.CopyDir(testdataSrc, tmpWorkDir, true, nil) assert.NoError(t, err) if technology == coreutils.Go { @@ -5619,7 +5619,7 @@ func testProjectInit(t *testing.T, projectExampleName string, technology coreuti err = platformCli.WithoutCredentials().Exec("project", "init", "--path", tmpWorkDir, "--server-id="+tests.ServerId) assert.NoError(t, err) // Validate correctness of .jfrog/projects/$technology.yml - validateProjectYamlFile(t, tmpWorkDir, technology.ToString()) + validateProjectYamlFile(t, tmpWorkDir, technology.String()) // Validate correctness of .jfrog/projects/build.yml validateBuildYamlFile(t, tmpWorkDir) } diff --git a/go.mod b/go.mod index 4fb2d7d49..293ebcf6c 100644 --- a/go.mod +++ b/go.mod @@ -126,7 +126,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230904170814-03a7938bae94 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index efe0a6983..4f10d5ce1 100644 --- a/go.sum +++ b/go.sum @@ -239,8 +239,6 @@ github.com/jfrog/build-info-go v1.9.10 h1:uXnDLVxpqxoAMpXcki00QaBB+M2BoGMMpHODPk github.com/jfrog/build-info-go v1.9.10/go.mod h1:ujJ8XQZMdT2tMkLSMJNyDd1pCY+duwHdjV+9or9FLIg= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.43.1 h1:SkbaQ4eAUrVa6r7eYNI6Co9TrNk3NUz2/LFYawAEVBc= -github.com/jfrog/jfrog-cli-core/v2 v2.43.1/go.mod h1:DKTOX9TsPkyI68GM4XdDTD7XDr+tOBqeK70DZZmu+4Q= github.com/jfrog/jfrog-client-go v1.32.3 h1:B2M8Gu8EMrokbHWPPDgN1b7YRWwf0oe746epvQASK6c= github.com/jfrog/jfrog-client-go v1.32.3/go.mod h1:UewnwkIf/77HzBgwCPzOHZCK6V/Nw5/JwdzN/tRb4aU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -306,6 +304,8 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= +github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7 h1:4CGOWjM/PGCiKeFpptT58sye0S870WWcT+wcLjips+U= +github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7/go.mod h1:DKTOX9TsPkyI68GM4XdDTD7XDr+tOBqeK70DZZmu+4Q= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= diff --git a/scan/cli.go b/scan/cli.go index 33c6df002..e9342f2b9 100644 --- a/scan/cli.go +++ b/scan/cli.go @@ -185,10 +185,10 @@ func AuditCmd(c *cli.Context) error { // On Maven we use '--mvn' flag techExists = c.Bool("mvn") } else { - techExists = c.Bool(tech.ToString()) + techExists = c.Bool(tech.String()) } if techExists { - technologies = append(technologies, tech.ToString()) + technologies = append(technologies, tech.String()) } } auditCmd.SetTechnologies(technologies) From 7777618627ec8a70705f07c72d677651517dc21b Mon Sep 17 00:00:00 2001 From: Omer Zidkoni Date: Tue, 19 Sep 2023 08:11:19 +0300 Subject: [PATCH 3/5] Align changes with core --- go.mod | 2 +- go.sum | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 293ebcf6c..764d8d953 100644 --- a/go.mod +++ b/go.mod @@ -126,7 +126,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7 +replace github.com/jfrog/jfrog-cli-core/v2 => ../jfrog-cli-core // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 4f10d5ce1..c151b702e 100644 --- a/go.sum +++ b/go.sum @@ -304,8 +304,6 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= -github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7 h1:4CGOWjM/PGCiKeFpptT58sye0S870WWcT+wcLjips+U= -github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230918052336-7ecae8daaaa7/go.mod h1:DKTOX9TsPkyI68GM4XdDTD7XDr+tOBqeK70DZZmu+4Q= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= From 0ce8c6199184c12833c3cbce9a6722ba0ef134b4 Mon Sep 17 00:00:00 2001 From: Omer Zidkoni Date: Tue, 19 Sep 2023 08:32:37 +0300 Subject: [PATCH 4/5] core update --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 764d8d953..6172fed8c 100644 --- a/go.mod +++ b/go.mod @@ -126,7 +126,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => ../jfrog-cli-core +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230919052701-996d96513bc8 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index c151b702e..9a2a04ef4 100644 --- a/go.sum +++ b/go.sum @@ -304,6 +304,8 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= +github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230919052701-996d96513bc8 h1:2FZ4lKPoo0LndOBelUIvKGopiiboap2bjw+rVbq46/I= +github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230919052701-996d96513bc8/go.mod h1:DKTOX9TsPkyI68GM4XdDTD7XDr+tOBqeK70DZZmu+4Q= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= From 25eab3b8fc90ebc755400d35457dc1fc90605ccb Mon Sep 17 00:00:00 2001 From: Omer Zidkoni Date: Tue, 19 Sep 2023 10:03:47 +0300 Subject: [PATCH 5/5] update core --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 6172fed8c..13fceb000 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/jfrog/build-info-go v1.9.10 github.com/jfrog/gofrog v1.3.0 - github.com/jfrog/jfrog-cli-core/v2 v2.43.1 + github.com/jfrog/jfrog-cli-core/v2 v2.43.2 github.com/jfrog/jfrog-client-go v1.32.3 github.com/jszwec/csvutil v1.8.0 github.com/mholt/archiver/v3 v3.5.1 @@ -126,7 +126,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230919052701-996d96513bc8 +//replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.15.3-0.20230919052701-996d96513bc8 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 9a2a04ef4..98162a241 100644 --- a/go.sum +++ b/go.sum @@ -239,6 +239,8 @@ github.com/jfrog/build-info-go v1.9.10 h1:uXnDLVxpqxoAMpXcki00QaBB+M2BoGMMpHODPk github.com/jfrog/build-info-go v1.9.10/go.mod h1:ujJ8XQZMdT2tMkLSMJNyDd1pCY+duwHdjV+9or9FLIg= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= +github.com/jfrog/jfrog-cli-core/v2 v2.43.2 h1:ii8fj8tqbGwgU1yxNpfDECtXJe2wC2YzAQrCzIpIVyw= +github.com/jfrog/jfrog-cli-core/v2 v2.43.2/go.mod h1:DKTOX9TsPkyI68GM4XdDTD7XDr+tOBqeK70DZZmu+4Q= github.com/jfrog/jfrog-client-go v1.32.3 h1:B2M8Gu8EMrokbHWPPDgN1b7YRWwf0oe746epvQASK6c= github.com/jfrog/jfrog-client-go v1.32.3/go.mod h1:UewnwkIf/77HzBgwCPzOHZCK6V/Nw5/JwdzN/tRb4aU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -304,8 +306,6 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= -github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230919052701-996d96513bc8 h1:2FZ4lKPoo0LndOBelUIvKGopiiboap2bjw+rVbq46/I= -github.com/omerzi/jfrog-cli-core/v2 v2.15.3-0.20230919052701-996d96513bc8/go.mod h1:DKTOX9TsPkyI68GM4XdDTD7XDr+tOBqeK70DZZmu+4Q= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=