fix(cleanafter): do not remove built packages on cleanafter

This commit is contained in:
jguer 2020-07-01 09:14:54 +02:00
parent 3549aeca26
commit b5b4484c5c
No known key found for this signature in database
GPG key ID: 6D6CC9BEA8556B35

View file

@ -215,6 +215,9 @@ func cleanAfter(bases []Base) {
for i, base := range bases {
dir := filepath.Join(config.BuildDir, base.Pkgbase())
if !isGitRepository(dir) {
continue
}
text.OperationInfoln(gotext.Get("Cleaning (%d/%d): %s", i+1, len(bases), cyan(dir)))
@ -223,7 +226,7 @@ func cleanAfter(bases []Base) {
text.Errorln(gotext.Get("error resetting %s: %s", base.String(), stderr))
}
if err := show(passToGit(dir, "clean", "-fx")); err != nil {
if err := show(passToGit(dir, "clean", "-fx", "--exclude='*.pkg.*'")); err != nil {
fmt.Fprintln(os.Stderr, err)
}
}