buthomas / Cake.Flyway

A set of aliases for Cake to run Flyway commands
MIT License
1 stars 1 forks source link

Error: "Flyway Runner: Could not locate executable." #28

Open ehuna opened 4 years ago

ehuna commented 4 years ago

Hi,

I was thinking of implementing such a Cake add-in and then saw you did it. This is really cool, thank you!

I run the task below and it works great. But it only works when I copy the flyway folder where my cake script is located.

Is there a way to specify a different location where flyway is installed?

For example -

Here's my task -

`

addin "Cake.Flyway"

... // Needed for the 'run-flyway-validate' task var flywayUrl = Argument("flywayUrl", ""); var flywayUser = Argument("flywayUser", ""); var flywayPassword = Argument("flywayPassword", ""); ...

Task("run-flyway-validate") .Does(() => {

var flywayConfiguration = new FlywayConfiguration {
    Url = flywayUrl,
    User = flywayUser,
    Password = flywayPassword
};

var scriptsLocation = "../MYSCRIPTSPATH";

flywayConfiguration.AddFilesystemLocation(scriptsLocation);

var flywayInfoSettings =
    new FlywayInfoSettings
    {
        Configuration = flywayConfiguration
    };

FlywayInfo(flywayInfoSettings);

var flywayValidateSettings =
    new FlywayValidateSettings {
        Configuration = flywayConfiguration
    };

FlywayValidate(flywayValidateSettings);

}); `

ehuna commented 4 years ago

Note: I can add flyway to the Windows path for example - and that works.

I was just wondering if we could skip configuration on each device and just pass the flyway location explicilty.