Skip to content

Commit

Permalink
gp --exclusion new flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sarao1310 committed Jul 9, 2023
1 parent 7105337 commit 971f128
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions artifactory/commands/golang/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,19 @@ func archiveProject(writer io.Writer, dir, mod, version string, excludedPatterns
return filepath.SkipDir
}
}

if info.Mode().IsRegular() {
excluded, err := isPathExcluded(filePath, excludePatternsStr)
if err != nil {
return err
}
if !isVendoredPackage(slashPath) && !excluded {
files = append(files, dirFile{
filePath: filePath,
slashPath: slashPath,
info: info,
})
if !isVendoredPackage(slashPath) {
excluded, err := isPathExcluded(filePath, excludePatternsStr)
if err != nil {
return err
}
if !excluded {
files = append(files, dirFile{
filePath: filePath,
slashPath: slashPath,
info: info,
})
}
}
return nil
}
Expand Down

0 comments on commit 971f128

Please sign in to comment.