[docker] do not delete files from existing clone before adding new ones. Fixes
@@ -32,13 +32,11 @@ import org.jreleaser.util.PlatformUtils;
import org.jreleaser.util.command.Command;
import java.io.ByteArrayInputStream;
-import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -433,14 +431,6 @@ public class DockerToolProcessor extends AbstractRepositoryToolProcessor<Docker>
destination = directory.resolve(parts[1]);
}
- if (Files.exists(destination)) {
- Files.walk(destination)
- .filter(path -> !path.toString().contains(".git"))
- .sorted(Comparator.reverseOrder())
- .map(Path::toFile)
- .forEach(File::delete);
- }
-
Files.createDirectories(destination);
prepareWorkingCopy(source, destination);
