generateChangelog is destructive by default #2

stevesaliman opened this Issue Aug 3, 2012 · 3 comments


None yet
2 participants

stevesaliman commented Aug 3, 2012

The default behavior of the generateChangelog task is to append to changelog files if they currently exist.

I feel like this is a contradiction of and which both state that generateChangelog should write to stdout.

It gets more interesting when there are multiple changelogs defined in the build.gradle file. GenerateChangelog writes to all the files mentioned in the changelogs section with identical data.




tlberglund commented Aug 29, 2012

Thanks for posting this, Steve. I don't like the append behavior at all. Liquibase itself handles XML appending with a little bit of string manipulation (or something similar—I don't remember precisely) which is not available to me here. What would you say to having the plugin just fail if the changelog already exists? I think I prefer this behavior anyway. I've always thought of generateChangeLog as a bootstrapping command, such that appending isn't really meaningful. We have diff commands for that.


stevesaliman commented Aug 30, 2012

I agree. If you've got a project that already has a changelog, especially more than one, it means you've already plugged your project into the Liquibase universe. Appending to a changelog would be kind of meaningless at best, and at worst it would really confuse things with multiple changesets trying to do the same thing.

Failing if the changelog exists is a good way to tell the user "hey, this has already been done"

stevesaliman was assigned Jan 31, 2014


stevesaliman commented Jun 15, 2014

This is now fixed in 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment