Skip to content

Commit e1bb576

Browse files
committed
2.5.0
1 parent 2d188ee commit e1bb576

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/src/main/java/io/jooby/adoc/DocGenerator.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,11 @@ public static void generate(Path basedir, boolean publish, boolean v1) throws Ex
111111

112112
private static void v1doc(Path basedir, Path output) throws Exception {
113113
Path v1source = basedir.resolve("v1");
114-
if (!Files.exists(v1source)) {
115-
Files.createDirectories(v1source);
114+
FileUtils.cleanDirectory(v1source.toFile());
115+
Files.createDirectories(v1source);
116116

117-
Git git = new Git("jooby-project", "jooby", v1source);
118-
git.clone("--single-branch", "--branch", "gh-pages");
119-
}
117+
Git git = new Git("jooby-project", "jooby", v1source);
118+
git.clone("--single-branch", "--branch", "gh-pages");
120119
Path v1target = output.resolve("v1");
121120
FileUtils.copyDirectory(v1source.toFile(), v1target.toFile());
122121

0 commit comments

Comments
 (0)