Skip to content

Commit

Permalink
Revert change on detecting veracode folder in any folder and remove o…
Browse files Browse the repository at this point in the history
…nly root veracode folder
  • Loading branch information
Boy Baukema committed Nov 13, 2023
1 parent 8b9025a commit b95bede
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"os"
"os/exec"
"path/filepath"
"slices"
"strings"
"time"

Expand Down Expand Up @@ -186,20 +185,20 @@ func packageMainFile(mainFile string, packageDate string) error {
log.WithField("src", src).Debug("Skipping copying .git")
return true, nil
}
pathComponentsLinux := strings.Split(src, "/")
pathComponentsWindows := strings.Split(src, "\\")
isInVeracode := slices.Contains(pathComponentsLinux, "veracode") || slices.Contains(pathComponentsWindows, "veracode")
if isInVeracode {
log.WithField("src", src).Debug("Skipping copying veracode dir")
return true, nil
}
return false, nil
},
})
if err != nil {
return err
}

// TODO: Don't copy veracode dir, instead of copying it and then removing it
log.WithField("dir", copyDir+"/veracode").Debug("Removing veracode directory from copy")
err = os.RemoveAll(copyDir + "/veracode")
if err != nil {
return err
}

LogFiles(copyDir, "Copied Files")

err = vendorDir(copyDir)
Expand Down

0 comments on commit b95bede

Please sign in to comment.