gradle doc publishing add --delete option to rsync

This commit is contained in:
Andrea Boriero 2022-05-06 16:00:27 +02:00 committed by Andrea Boriero
parent 1bd4d572b4
commit 81d6fef345
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ public abstract class PublishTask extends DefaultTask {
getProject().getLogger().lifecycle( "Uploading documentation `{}` -> `{}`", stagingDirPath, url );
final ExecResult result = getProject().exec( (exec) -> {
exec.executable( "rsync" );
exec.args("--port=2222", "-avz", "--links", stagingDirPath, url );
exec.args("--port=2222", "-avz", "--links", "--delete", stagingDirPath, url );
} );
getProject().getLogger().lifecycle( "Done uploading documentation - {}", result.getExitValue() == 0 ? "success" : "failure" );
}