Created
August 19, 2010 13:27
-
-
Save hartsock/537873 to your computer and use it in GitHub Desktop.
Installs plugin zip files found in a Grails apps' base directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* install in your application's 'scripts' directory. | |
* <p/> | |
* invoke: $ grails install-local-plugins | |
* <p/> | |
* @author Shawn Hartsock <[email protected]> | |
*/ | |
includeTargets << grailsScript("Init") | |
includeTargets << grailsScript("_PluginDependencies") | |
target(installLocalPlugins: "The description of the script goes here!") { | |
def plugins = [] | |
new File( Ant.project.properties.basedir ).listFiles().each { File f -> | |
if(f.isFile() && f.name.startsWith("grails") && f.name.endsWith(".zip")) { | |
plugins.add(f) | |
} | |
} | |
println "plugins found: ${plugins}" | |
def isInt = isInteractive | |
plugins.each { plugin -> | |
println "installing: ${plugin}" | |
isInteractive = false | |
doInstallPluginZip(plugin) | |
println "finished with: ${plugin}" | |
} | |
isInteractive = isInt | |
println "local plugins were installed." | |
} | |
setDefaultTarget(installLocalPlugins) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This one is the sound of me giving up on doing things the right way.