ework.profiles.base.2023.2.0-M1.source-code.create-script.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of base Show documentation
Show all versions of base Show documentation
A Grace profile for other profiles to extend from.
The newest version!
import grails.util.*
description( "Creates a Grace script" ) {
usage "grace create-script [SCRIPT NAME]"
argument name:'Script Name', description:"The name of the script to create", required:true
flag name:'force', description:"Whether to overwrite existing files"
}
def scriptName = GrailsNameUtils.getClassNameForLowerCaseHyphenSeparatedName(args[0])
def model = model(scriptName)
boolean overwrite = flag('force')
render template: template('artifacts/Script.groovy'),
destination: file("src/main/scripts/${model.lowerCaseName}.groovy"),
model: model,
overwrite: overwrite
© 2015 - 2024 Weber Informatics LLC | Privacy Policy