Skip to content

Commit

Permalink
Always ignore some files in application package
Browse files Browse the repository at this point in the history
  • Loading branch information
mpolden committed Sep 12, 2024
1 parent 685285f commit 984c6ef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion client/go/internal/vespa/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ func (ap *ApplicationPackage) Validate() error {

func isZip(filename string) bool { return filepath.Ext(filename) == ".zip" }

func alwaysIgnore(filename string) bool {
switch filepath.Base(filename) {
case ".DS_Store":
return true
}
return false
}

func zipDir(dir string, destination string, ignores *ignore.List) error {
if !ioutil.Exists(dir) {
message := "'" + dir + "' should be an application package zip or dir, but does not exist"
Expand All @@ -108,7 +116,7 @@ func zipDir(dir string, destination string, ignores *ignore.List) error {
if err != nil {
return err
}
if ignores.Match(zipPath) {
if alwaysIgnore(path) || ignores.Match(zipPath) {
if info.IsDir() {
return filepath.SkipDir
}
Expand Down

0 comments on commit 984c6ef

Please sign in to comment.