Skip to content

Commit f2f603e

Browse files
Merge branch 'dev' into poetry-install
2 parents 514324f + 33f3a1e commit f2f603e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2510
-829
lines changed

artifactory/commands/buildinfo/publish.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ package buildinfo
33
import (
44
"errors"
55
"fmt"
6-
"github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/commandssummaries"
7-
"github.com/jfrog/jfrog-cli-core/v2/commandsummary"
6+
"github.com/jfrog/jfrog-cli-core/v2/artifactory/utils/commandsummary"
87
"net/url"
98
"strconv"
109
"strings"
@@ -146,7 +145,7 @@ func (bpc *BuildPublishCommand) Run() error {
146145
return err
147146
}
148147

149-
if err = recordCommandSummary(buildInfo, buildLink, bpc.serverDetails.Url, majorVersion); err != nil {
148+
if err = recordCommandSummary(buildInfo, buildLink); err != nil {
150149
return err
151150
}
152151

@@ -232,12 +231,12 @@ func (bpc *BuildPublishCommand) getNextBuildNumber(buildName string, servicesMan
232231
return strconv.Itoa(latestBuildNumber), nil
233232
}
234233

235-
func recordCommandSummary(buildInfo *buildinfo.BuildInfo, buildLink, serverUrl string, majorVersion int) (err error) {
234+
func recordCommandSummary(buildInfo *buildinfo.BuildInfo, buildLink string) (err error) {
236235
if !commandsummary.ShouldRecordSummary() {
237236
return
238237
}
239238
buildInfo.BuildUrl = buildLink
240-
buildInfoSummary, err := commandsummary.New(commandssummaries.NewBuildInfo(serverUrl, majorVersion), "build-info")
239+
buildInfoSummary, err := commandsummary.NewBuildInfoSummary()
241240
if err != nil {
242241
return
243242
}

artifactory/commands/commandssummaries/buildinfosummary.go

Lines changed: 0 additions & 120 deletions
This file was deleted.

artifactory/commands/commandssummaries/buildinfosummary_test.go

Lines changed: 0 additions & 129 deletions
This file was deleted.

artifactory/commands/commandssummaries/testdata/modules.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

artifactory/commands/commandssummaries/testdata/table.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

artifactory/commands/commandssummaries/utils.go

Lines changed: 0 additions & 19 deletions
This file was deleted.

artifactory/commands/generic/upload.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ package generic
22

33
import (
44
"errors"
5-
"github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/commandssummaries"
6-
"github.com/jfrog/jfrog-cli-core/v2/commandsummary"
7-
"github.com/jfrog/jfrog-client-go/artifactory"
5+
"github.com/jfrog/jfrog-cli-core/v2/artifactory/utils/commandsummary"
86
"os"
97

108
buildInfo "github.com/jfrog/build-info-go/entities"
@@ -159,7 +157,7 @@ func (uc *UploadCommand) upload() (err error) {
159157
successCount = summary.TotalSucceeded
160158
failCount = summary.TotalFailed
161159

162-
if err = recordCommandSummary(servicesManager, summary, serverDetails.Url); err != nil {
160+
if err = recordCommandSummary(summary); err != nil {
163161
return
164162
}
165163
}
@@ -282,17 +280,11 @@ func createDeleteSpecForSync(deletePattern string, syncDeletesProp string) *spec
282280
BuildSpec()
283281
}
284282

285-
func recordCommandSummary(servicesManager artifactory.ArtifactoryServicesManager, summary *rtServicesUtils.OperationSummary, platformUrl string) (err error) {
283+
func recordCommandSummary(summary *rtServicesUtils.OperationSummary) (err error) {
286284
if !commandsummary.ShouldRecordSummary() {
287285
return
288286
}
289-
290-
majorVersion, err := utils.GetRtMajorVersion(servicesManager)
291-
if err != nil {
292-
return err
293-
}
294-
295-
uploadSummary, err := commandsummary.New(commandssummaries.NewUploadSummary(platformUrl, majorVersion), "upload")
287+
uploadSummary, err := commandsummary.NewUploadSummary()
296288
if err != nil {
297289
return
298290
}

0 commit comments

Comments
 (0)