We currently use the output for two purposes in our pipelines:
During the Pull Request Verify job of our pipeline we execute Flyway Info and parse the output to post a message back to GitHub indicating the current schema version and which migrations will ultimately be executed (those pending) upon merge of the Pull Request. Here is an example.
We also use the same to execute a query back to the flyway_schema_history table to determine the path of the pending migrations so that we can do other work with them. If Flyway Info returned the path, we wouldn't need to do that.
We have both cases working, but it's a bit fragile parsing the text output. There were significant breaking changes to it when moving to 5. Hence, it would be nice to have the option for formatted output that we can rely upon and more easily parse.
We'd like to find out the currently deployed version in a gradle build, please consider a specific field for that to save looping/parsing.
It might also be useful to know the latest version available, I appreciate we could work this out by listing a directory and applying a regex and sorting but I'd rather defer to flyway's algorithm on that.