Skip to content

Commit

Permalink
Modify gradle build to zip up distributions.
Browse files Browse the repository at this point in the history
Modify Usage text.
Modify shell script on location of liquify.jar file.
Add license.
  • Loading branch information
daquino committed Jun 26, 2015
1 parent aed1ff0 commit 1412f28
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 20 deletions.
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# liquifier
# Liquify

Liquifier is a command-line tool to convert Liquibase changelog files
between the supported file formats(xml,yaml,json,sql).
Liquify is a command-line tool to convert [Liquibase](http://www.liquibase.org) changelog files
between the supported file formats(xml,yaml,json,sql). The project comes with the
liquify bash shell script as the default way to launch the tool. However, if you do not
have BASH on your machine, you can still launch the still using the java command as well (java -jar liquify.jar [-options] <source>).

```
Usage:
liquify [-options] <source>
liquify [-options] <source>

Options:
Required:
-t, --type Change log file type to convert to (xml,yaml,json,sql).

Optional:
-db, --database Database type to use when using the sql type (i.e oracle, h2, etc).

Options:
Required:
-t,--type Target changelog file type (xml,yaml,json,sql).
Conditional:
-db,--database Database type to use when using the sql type (i.e oracle, h2, etc).
Example Usage:
liquify -t sql -db oracle db.changelog.xml (creates db.changelog.oracle.sql with the oracle dialect).
```
_Note: When using the sql change log file type, not all bundled change commands are supported the different
database types (i.e. createSequence, addAutoIncrement, etc). If the tool fails to build when trying to,
convert to the sql type, it could be because of the desired database type not supporting a bundle change command
in the source change log file._
23 changes: 17 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group 'com.refactify'
version '1.0-SNAPSHOT'
version '1.0'

apply plugin: 'java'

Expand All @@ -26,10 +26,21 @@ dependencies {
compile "org.yaml:snakeyaml:1.13"
}

task dist(dependsOn: ['clean', 'shadowJar'], type: Copy) {
from 'src/main/shell/'
from ('build/libs/') {
rename 'liquify(.*).jar', 'liquify.jar'
task prepareDist(dependsOn: 'shadowJar') << {
copy {
from ('build/libs/') {
rename 'liquify(.*).jar', 'liquify.jar'
}
into 'build/dist/libs'
}
into 'build/dist/'
copy {
from 'src/main/shell/'
into 'build/dist/'
}
}

task dist(dependsOn: ['clean', 'prepareDist'], type: Zip) {
from ('build/dist')
into (baseName + '-' + version)

}
21 changes: 21 additions & 0 deletions license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Daniel Aquino

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion src/main/java/com/refactify/printer/UsagePrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public void printUsage() {
System.out.println(" Options:");
System.out.println(" Required:");
System.out.println(" -t,--type Target changelog file type(xml,yaml,json,sql).");
System.out.println(" Optional:");
System.out.println(" Conditional:");
System.out.println(" -db,--database Database type to use when using the sql type (i.e oracle, h2, etc).");
System.out.println("\n" +
"Example Usage:\n" +
Expand Down
2 changes: 1 addition & 1 deletion src/main/shell/liquify
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
java -jar liquify.jar "$@"
java -jar libs/liquify.jar "$@"s

0 comments on commit 1412f28

Please sign in to comment.