use of liquibase.command.CommandResult in project liquibase by liquibase.
the class GenerateChangeLogCommand method run.
@Override
protected CommandResult run() throws Exception {
DiffResult diffResult = createDiffResult();
DiffToChangeLog changeLogWriter = new DiffToChangeLog(diffResult, getDiffOutputControl());
changeLogWriter.setChangeSetAuthor(author);
changeLogWriter.setChangeSetContext(context);
changeLogWriter.setChangeSetPath(getChangeLogFile());
if (StringUtils.trimToNull(getChangeLogFile()) != null) {
changeLogWriter.print(getChangeLogFile());
} else {
PrintStream outputStream = getOutputStream();
if (outputStream == null) {
outputStream = System.out;
}
changeLogWriter.print(outputStream);
}
return new CommandResult("OK");
}
Aggregations