Skip to content

Commit

Permalink
fix: [#384] Create groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
030 committed Nov 25, 2023
1 parent b66c70c commit c079292
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions internal/app/n3dr/artifactsv2/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func (n *Nexus3) UploadSingleArtifact(client *client.Nexus3, path, localDiskRepo
c.Repository = localDiskRepo
f, err := os.Open(filepath.Clean(path))
if err != nil {
return false, nil
return false, err
}
c.AptAsset = f
case "maven2":
Expand All @@ -391,13 +391,13 @@ func (n *Nexus3) UploadSingleArtifact(client *client.Nexus3, path, localDiskRepo
c.Repository = localDiskRepo

if err := af.mavenJarAndOtherExtensions(&c, fileNameWithoutExtIncludingDir, skipErrors); err != nil {
return false, nil
return false, err
}

var err error
f, err = os.Open(filepath.Clean(filePathPom))
if err != nil {
return false, nil
return false, err
}
c.Maven2Asset1 = f
ext1 := "pom"
Expand Down Expand Up @@ -448,13 +448,13 @@ func (n *Nexus3) UploadSingleArtifact(client *client.Nexus3, path, localDiskRepo
c.Repository = localDiskRepo

if err := af.mavenJarAndOtherExtensions(&c, fileNameWithoutExtIncludingDir, skipErrors); err != nil {
return false, nil
return false, err
}

//
mp, err := maven(path, skipErrors)
if err != nil {
return false, nil
return false, err
}
c.Maven2ArtifactID = &mp.artifact
c.Maven2Version = &mp.version
Expand Down Expand Up @@ -523,21 +523,21 @@ func (n *Nexus3) UploadSingleArtifact(client *client.Nexus3, path, localDiskRepo
c.Repository = localDiskRepo
f, err := os.Open(filepath.Clean(path))
if err != nil {
return false, nil
return false, err
}
c.NpmAsset = f
case "nuget":
c.Repository = localDiskRepo
f, err := os.Open(filepath.Clean(path))
if err != nil {
return false, nil
return false, err
}
c.NugetAsset = f
case "raw":
c.Repository = localDiskRepo
f, err := os.Open(filepath.Clean(path))
if err != nil {
return false, nil
return false, err
}
c.RawAsset1 = f
c.RawDirectory = &dir
Expand All @@ -548,15 +548,15 @@ func (n *Nexus3) UploadSingleArtifact(client *client.Nexus3, path, localDiskRepo
c.Repository = localDiskRepo
f, err := os.Open(filepath.Clean(path))
if err != nil {
return false, nil
return false, err
}
c.RubygemsAsset = f
}
case "yum":
c.Repository = localDiskRepo
f, err := os.Open(filepath.Clean(path))
if err != nil {
return false, nil
return false, err
}
c.YumAsset = f
c.YumAssetFilename = &filename
Expand All @@ -566,7 +566,7 @@ func (n *Nexus3) UploadSingleArtifact(client *client.Nexus3, path, localDiskRepo

files := []*os.File{f, af.f2, af.f3, af.f4, af.f5, af.f6, af.f2, af.f7}
if err := upload(c, client, path, files); err != nil {
return false, nil
return false, err
}

return false, nil
Expand Down

0 comments on commit c079292

Please sign in to comment.