From c8c1e14358a8e4709939119f8418e5e6c7754d96 Mon Sep 17 00:00:00 2001 From: Omer Zidkoni <50792403+omerzi@users.noreply.github.com> Date: Wed, 20 Dec 2023 13:14:02 +0200 Subject: [PATCH 1/3] Handle Gradle system properties with spaces (#1072) --- artifactory/commands/gradle/gradle.go | 4 ++-- go.mod | 4 ++-- go.sum | 10 ++++------ utils/gradle/utils.go | 8 +++----- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/artifactory/commands/gradle/gradle.go b/artifactory/commands/gradle/gradle.go index 376ef3067..334dcafad 100644 --- a/artifactory/commands/gradle/gradle.go +++ b/artifactory/commands/gradle/gradle.go @@ -14,7 +14,7 @@ import ( ) type GradleCommand struct { - tasks string + tasks []string configPath string configuration *utils.BuildConfiguration serverDetails *config.ServerDetails @@ -179,7 +179,7 @@ func (gc *GradleCommand) SetConfigPath(configPath string) *GradleCommand { return gc } -func (gc *GradleCommand) SetTasks(tasks string) *GradleCommand { +func (gc *GradleCommand) SetTasks(tasks []string) *GradleCommand { gc.tasks = tasks return gc } diff --git a/go.mod b/go.mod index f9e597f6d..0f96a52a1 100644 --- a/go.mod +++ b/go.mod @@ -99,8 +99,8 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect ) -// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20231218145716-9ded9d0ce973 +replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20231220105505-e62769dde9da -// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20231130093251-25c79868c10c +replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20231220102935-c8776c613ad8 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.3.2-0.20231130091721-6d742be8bc7a diff --git a/go.sum b/go.sum index b2008f9e4..5b36f7f26 100644 --- a/go.sum +++ b/go.sum @@ -85,14 +85,14 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.4.0 h1:YlI/2zYDrweA4MThiYMKtGRfT+2qZOO65ulej8GTcVI= github.com/jedib0t/go-pretty/v6 v6.4.0/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI= -github.com/jfrog/build-info-go v1.9.17 h1:sUA6V3P8i+awYlK7dkwm4l6IuLE2W964F5Pb18x95HA= -github.com/jfrog/build-info-go v1.9.17/go.mod h1:/5VZXH2Ud0IK3cOFwPykjwPOaEcHhzzbjnRiou+YKpM= +github.com/jfrog/build-info-go v1.8.9-0.20231220102935-c8776c613ad8 h1:eAMet7vShbCBSL4QCia/F7pvtPHUGPqVqpvv3Y0cOkw= +github.com/jfrog/build-info-go v1.8.9-0.20231220102935-c8776c613ad8/go.mod h1:/5VZXH2Ud0IK3cOFwPykjwPOaEcHhzzbjnRiou+YKpM= github.com/jfrog/gofrog v1.3.2 h1:TktKP+PdZdxjkYZxWWIq4DkTGSYtr9Slsy+egZpEhUY= github.com/jfrog/gofrog v1.3.2/go.mod h1:AQo5Fq0G9nDEF6icH7MYQK0iohR4HuEAXl8jaxRuT6Q= 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-client-go v1.35.2 h1:JtGqf7KK+wcx/Pf5b0MUrkvMc+tCtIi0cB5TxFjQxnk= -github.com/jfrog/jfrog-client-go v1.35.2/go.mod h1:p80RAyfQQ78M2r5LUw1uUTA8yxTmTNoPy7eJ4IzOge0= +github.com/jfrog/jfrog-client-go v1.28.1-0.20231220105505-e62769dde9da h1:t56rae4Ut2XDvubtxTbrjUk4neWvu+KcwlDlJ5BYBMc= +github.com/jfrog/jfrog-client-go v1.28.1-0.20231220105505-e62769dde9da/go.mod h1:0NN5REuCDly9u0FtZxmb1wcOBr1cVR/gPazyZSO8Zs0= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -226,8 +226,6 @@ 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.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 h1:qCEDpW1G+vcj3Y7Fy52pEM1AWm3abj8WimGYejI3SC4= diff --git a/utils/gradle/utils.go b/utils/gradle/utils.go index 0aa27d8c6..6451278aa 100644 --- a/utils/gradle/utils.go +++ b/utils/gradle/utils.go @@ -2,14 +2,12 @@ package gradleutils import ( "fmt" - "path/filepath" - "strings" - "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils" "github.com/jfrog/jfrog-cli-core/v2/utils/config" "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" "github.com/jfrog/jfrog-client-go/utils/errorutils" "github.com/spf13/viper" + "path/filepath" ) const ( @@ -17,7 +15,7 @@ const ( useWrapper = "usewrapper" ) -func RunGradle(vConfig *viper.Viper, tasks, deployableArtifactsFile string, configuration *utils.BuildConfiguration, threads int, disableDeploy bool) error { +func RunGradle(vConfig *viper.Viper, tasks []string, deployableArtifactsFile string, configuration *utils.BuildConfiguration, threads int, disableDeploy bool) error { buildInfoService := utils.CreateBuildInfoService() buildName, err := configuration.GetBuildName() if err != nil { @@ -43,7 +41,7 @@ func RunGradle(vConfig *viper.Viper, tasks, deployableArtifactsFile string, conf if err != nil { return err } - gradleModule.SetExtractorDetails(dependencyLocalPath, filepath.Join(coreutils.GetCliPersistentTempDirPath(), utils.PropertiesTempPath), strings.Split(tasks, " "), wrapper, plugin, utils.DownloadExtractor, props) + gradleModule.SetExtractorDetails(dependencyLocalPath, filepath.Join(coreutils.GetCliPersistentTempDirPath(), utils.PropertiesTempPath), tasks, wrapper, plugin, utils.DownloadExtractor, props) return coreutils.ConvertExitCodeError(gradleModule.CalcDependencies()) } From b147c5e20c86ed03149354e4cebfe88bd88c708c Mon Sep 17 00:00:00 2001 From: Or Toren <129293360+orto17@users.noreply.github.com> Date: Wed, 20 Dec 2023 18:27:19 +0200 Subject: [PATCH 2/3] upgraded analyzer manager to version 1.6.3 (#1083) --- xray/utils/analyzermanager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xray/utils/analyzermanager.go b/xray/utils/analyzermanager.go index 6ca376c4f..4d6952d1e 100644 --- a/xray/utils/analyzermanager.go +++ b/xray/utils/analyzermanager.go @@ -20,7 +20,7 @@ const ( EntitlementsMinVersion = "3.66.5" ApplicabilityFeatureId = "contextual_analysis" AnalyzerManagerZipName = "analyzerManager.zip" - defaultAnalyzerManagerVersion = "1.6.2" + defaultAnalyzerManagerVersion = "1.6.3" analyzerManagerDownloadPath = "xsc-gen-exe-analyzer-manager-local/v1" analyzerManagerDirName = "analyzerManager" analyzerManagerExecutableName = "analyzerManager" From 3343867395f6470534d38423a0bdafbb7f5973ef Mon Sep 17 00:00:00 2001 From: Eyal Ben Moshe Date: Thu, 21 Dec 2023 07:13:02 +0200 Subject: [PATCH 3/3] Upgrade jfrog-client-go & build-info-go (#1085) --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 0f96a52a1..c59022b36 100644 --- a/go.mod +++ b/go.mod @@ -13,10 +13,10 @@ require ( github.com/gocarina/gocsv v0.0.0-20231116093920-b87c2d0e983a github.com/google/uuid v1.5.0 github.com/gookit/color v1.5.4 - github.com/jfrog/build-info-go v1.9.17 + github.com/jfrog/build-info-go v1.9.18 github.com/jfrog/gofrog v1.3.2 github.com/jfrog/jfrog-apps-config v1.0.1 - github.com/jfrog/jfrog-client-go v1.35.2 + github.com/jfrog/jfrog-client-go v1.35.3 github.com/magiconair/properties v1.8.7 github.com/manifoldco/promptui v0.9.0 github.com/owenrumney/go-sarif/v2 v2.3.0 @@ -99,8 +99,8 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect ) -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20231220105505-e62769dde9da +// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20231220105505-e62769dde9da -replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20231220102935-c8776c613ad8 +// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20231220102935-c8776c613ad8 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.3.2-0.20231130091721-6d742be8bc7a diff --git a/go.sum b/go.sum index 5b36f7f26..b1dda394f 100644 --- a/go.sum +++ b/go.sum @@ -85,14 +85,14 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.4.0 h1:YlI/2zYDrweA4MThiYMKtGRfT+2qZOO65ulej8GTcVI= github.com/jedib0t/go-pretty/v6 v6.4.0/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI= -github.com/jfrog/build-info-go v1.8.9-0.20231220102935-c8776c613ad8 h1:eAMet7vShbCBSL4QCia/F7pvtPHUGPqVqpvv3Y0cOkw= -github.com/jfrog/build-info-go v1.8.9-0.20231220102935-c8776c613ad8/go.mod h1:/5VZXH2Ud0IK3cOFwPykjwPOaEcHhzzbjnRiou+YKpM= +github.com/jfrog/build-info-go v1.9.18 h1:0RKeZtNWZjONX5j94aIPQSKMi1whP2evmGQymYF+5mA= +github.com/jfrog/build-info-go v1.9.18/go.mod h1:/5VZXH2Ud0IK3cOFwPykjwPOaEcHhzzbjnRiou+YKpM= github.com/jfrog/gofrog v1.3.2 h1:TktKP+PdZdxjkYZxWWIq4DkTGSYtr9Slsy+egZpEhUY= github.com/jfrog/gofrog v1.3.2/go.mod h1:AQo5Fq0G9nDEF6icH7MYQK0iohR4HuEAXl8jaxRuT6Q= 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-client-go v1.28.1-0.20231220105505-e62769dde9da h1:t56rae4Ut2XDvubtxTbrjUk4neWvu+KcwlDlJ5BYBMc= -github.com/jfrog/jfrog-client-go v1.28.1-0.20231220105505-e62769dde9da/go.mod h1:0NN5REuCDly9u0FtZxmb1wcOBr1cVR/gPazyZSO8Zs0= +github.com/jfrog/jfrog-client-go v1.35.3 h1:Kf4mErh1tlbHzKz3941+d9vpEsPM2clgdOaYOKfNQGI= +github.com/jfrog/jfrog-client-go v1.35.3/go.mod h1:rXo6bjAe10V8nLMDYDl1n8sOM6mDRAGSZCo18Rs9kdM= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=