public static int UpdateDatabase(this ICakeContext context, Action <LiquibaseSettings> liquibaseSettingsAction) { var liquibaseSettings = new LiquibaseSettings(); if (liquibaseSettingsAction != null) { liquibaseSettingsAction(liquibaseSettings); } return(UpdateDatabase(context, liquibaseSettings)); }
public static int UpdateDatabase(this ICakeContext context, LiquibaseSettings liquibaseSettings) { var result = new LiquibaseRunner(context.ProcessRunner, context.Log, context.Tools, context.Globber, context.Environment.Platform) .Start(Commands.Update, liquibaseSettings); if (result != 0) { throw new InvalidOperationException("Error running liquibase"); } return(result); }