Ignore hidden file when creating archive file (#1450)

This commit is contained in:
Ta-Ching Chen
2019-12-01 09:58:16 +08:00
committed by GitHub
parent 506b427124
commit 6301a78814
5 changed files with 94 additions and 14 deletions
+4 -4
View File
@@ -427,13 +427,13 @@ func localArchiveFromSpec(specDir string, aus *spectypes.ArchiveUploadSpec) (*fv
files = append(files, aus.IncludeGlobs[0])
} else {
for _, relativeGlob := range aus.IncludeGlobs {
absGlob := rootDir + "/" + relativeGlob
f, err := filepath.Glob(absGlob)
absGlob := filepath.Join(rootDir, relativeGlob)
console.Verbose(2, "try to find globs in path '%v'", absGlob)
fs, err := utils.FindAllGlobs(absGlob)
if err != nil {
return nil, errors.Wrapf(err, "Invalid glob in archive %v: %v", aus.Name, relativeGlob)
}
files = append(files, f...)
// xxx handle excludeGlobs here
files = append(files, fs...)
}
}