diff --git a/AlaWebThemeGrailsPlugin.groovy b/AlaWebThemeGrailsPlugin.groovy index 8e7094e..d3bce60 100644 --- a/AlaWebThemeGrailsPlugin.groovy +++ b/AlaWebThemeGrailsPlugin.groovy @@ -4,7 +4,7 @@ import grails.util.Holders class AlaWebThemeGrailsPlugin { // the plugin version - def version = "0.5" + def version = "0.6" // the version or versions of Grails the plugin is designed for def grailsVersion = "2.1 > *" // the other plugins this plugin depends on diff --git a/scripts/_Install.groovy b/scripts/_Install.groovy index ab6dfc8..a700244 100644 --- a/scripts/_Install.groovy +++ b/scripts/_Install.groovy @@ -11,41 +11,41 @@ // backup original project files //ant.echo("Backing-up project files: index.gsp and layouts/main.gsp") // copy over plugin files -//ant.echo("Copying over plugin files: index.gsp and layouts/main.gsp") +ant.echo("NOTE: Please copy the plugin file: 'layouts/main.gsp' into your local app") -try { - File layoutFile = new File(new File(new File(basedir, "grails-app"), "views/layouts"), "main.gsp") - def toLayoutFile = "${basedir}/grails-app/views/layouts/main.gsp" - File indexFile = new File(new File(new File(basedir, "grails-app"), "views"), "index.gsp") - def toIndexFile = "${basedir}/grails-app/views/index.gsp" - - if (layoutFile.exists()) { - toLayoutFile += ".new" - } - if (indexFile.exists()) { - toIndexFile += ".new" - } - if (!(layoutFile.exists() && indexFile.exists())) { - // assume first time installation - backup original files first - if (layoutFile.exists()) { - ant.copy(file: "${basedir}/grails-app/views/layouts/main.gsp", - toFile: "${basedir}/grails-app/views/layouts/main.gsp.bak") - } - if (indexFile.exists()) { - ant.copy(file: "${basedir}/grails-app/views/index.gsp", - toFile: "${basedir}/grails-app/views/index.gsp.bak") - } - } - -//layout file - ant.copy(file: "${pluginBasedir}/grails-app/views/layouts/main.gsp", - toFile: toLayoutFile, - overwrite: true) -// index file - ant.copy(file: "${pluginBasedir}/grails-app/views/index.gsp", - toFile: toIndexFile, - overwrite: true) - -} catch (Exception ex) { - ant.echo("Error running install script: " + ex.message) -} \ No newline at end of file +//try { +// File layoutFile = new File(new File(new File(basedir, "grails-app"), "views/layouts"), "main.gsp") +// def toLayoutFile = "${basedir}/grails-app/views/layouts/main.gsp" +// File indexFile = new File(new File(new File(basedir, "grails-app"), "views"), "index.gsp") +// def toIndexFile = "${basedir}/grails-app/views/index.gsp" +// +// if (layoutFile.exists()) { +// toLayoutFile += ".new" +// } +// if (indexFile.exists()) { +// toIndexFile += ".new" +// } +// if (!(layoutFile.exists() && indexFile.exists())) { +// // assume first time installation - backup original files first +// if (layoutFile.exists()) { +// ant.copy(file: "${basedir}/grails-app/views/layouts/main.gsp", +// toFile: "${basedir}/grails-app/views/layouts/main.gsp.bak") +// } +// if (indexFile.exists()) { +// ant.copy(file: "${basedir}/grails-app/views/index.gsp", +// toFile: "${basedir}/grails-app/views/index.gsp.bak") +// } +// } +// +////layout file +// ant.copy(file: "${pluginBasedir}/grails-app/views/layouts/main.gsp", +// toFile: toLayoutFile, +// overwrite: true) +//// index file +// ant.copy(file: "${pluginBasedir}/grails-app/views/index.gsp", +// toFile: toIndexFile, +// overwrite: true) +// +//} catch (Exception ex) { +// ant.echo("Error running install script: " + ex.message) +//} \ No newline at end of file diff --git a/scripts/_Upgrade.groovy b/scripts/_Upgrade.groovy index d09cb10..48be053 100644 --- a/scripts/_Upgrade.groovy +++ b/scripts/_Upgrade.groovy @@ -9,4 +9,6 @@ // ant.mkdir(dir:"${basedir}/grails-app/jobs") // -evaluate(new File("_Install.groovy")) +//evaluate(new File("_Install.groovy")) + +ant.echo("NOTE: Please copy the plugin file: 'layouts/main.gsp' into your local app and check for changed against your local copy, as it may have changed")