tlberglund / groovy-liquibase

Yet Another Groovy DSL for Liquibase
Other
85 stars 66 forks source link

include does not work relative from changelog file #22

Closed jeroenvs closed 9 years ago

jeroenvs commented 13 years ago

Whenever a file resource accessor is used with a custom base path, include statements no longer work. This is because the include parser does not use the resource accessor, but new File(params.path), which has no knowledge of our base directory.

Code (DatabaseChangeLogDelegate.groovy - line 94 ~ 101):

def files = [] new File(params.path).eachFileMatch(~/.*.groovy/) { file-> files << file.path }

files.sort().each { filename -> includeChangeLog(filename) }

jeroenvs commented 13 years ago

Quick fix: https://github.com/42BV/groovy-liquibase/commit/acb44c7fecba325ec63acc24f0b78dd2db0f38c7

However, this fix does not recursively include files.

jeroenvs commented 13 years ago

Correction: files << params.path + '/' + new File(fileUrl.toURI()).name , otherwise the absolute path is included in our DATABASECHANGELOG table

stevesaliman commented 9 years ago

Is this still an issue?

stevesaliman commented 9 years ago

Closing due to age. If this is still an issue, please open a new issue in the new repository for this project, https://github.com/liquibase/liquibase-groovy-dsl